]> git.sesse.net Git - ffmpeg/commitdiff
msvc: Move linker pragma from config.h to libavutil/internal.h
authorMartin Storsjö <martin@martin.st>
Mon, 6 May 2013 20:08:41 +0000 (23:08 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 7 May 2013 22:28:25 +0000 (01:28 +0300)
This makes linking succeed for tools that include config.h but
don't link to libavutil.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure
libavutil/internal.h

index 44e626211d0c92fca6301a9a25d9b57ec892b88b..d85451980bf952609f58bd92ba37aef96187c29c 100755 (executable)
--- a/configure
+++ b/configure
@@ -4089,11 +4089,6 @@ fi
 
 enabled getenv || echo "#define getenv(x) NULL" >> $TMPH
 
-if enabled msvc && ! enabled shared; then
-    echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")' >> $TMPH
-    echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")' >> $TMPH
-fi
-
 print_config ARCH_   "$config_files" $ARCH_LIST
 print_config HAVE_   "$config_files" $HAVE_LIST
 print_config CONFIG_ "$config_files" $CONFIG_LIST       \
index 5f4b060926919e0f98854c132a4e735707b38803..49534d4b58a3849d0eb57c371def256322e743e6 100644 (file)
 
 #include "libm.h"
 
+#if defined(_MSC_VER) && !CONFIG_SHARED
+#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")
+#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")
+#endif
+
 /**
  * Return NULL if CONFIG_SMALL is true, otherwise the argument
  * without modification. Used to disable the definition of strings