Forráskód Böngészése

Adjust libtool and linker flags

Since we use libtool, -static-libgcc and -static-libstdc++ are
stripped by libtool and not used. We just use -all-static libtool flag
for this purpose.

To create windows dll, it turns out that we need -no-undefined flag.
Tatsuhiro Tsujikawa 12 éve
szülő
commit
cdbd4f0095
1 módosított fájl, 8 hozzáadás és 1 törlés
  1. 8 1
      configure.ac

+ 8 - 1
configure.ac

@@ -959,13 +959,20 @@ AM_CONDITIONAL([ANDROID_MIPS], [test "x$android_mips" = "xyes"])
 AM_CONDITIONAL([ANDROID_X86], [test "x$android_x86" = "xyes"])
 
 if test "x$ARIA2_STATIC" = "xyes"; then
-  LDFLAGS="$LDFLAGS -all-static -static-libgcc -static-libstdc++"
+  # -static-libgcc and -static-libstdc++ are linker flags and not for
+  # libtool.
+  LDFLAGS="$LDFLAGS -all-static"
   dnl For non-MinGW build, we need additional libs for static build.
   if test "x$win_build" != "xyes"; then
     LIBS="$LIBS -lpthread -ldl -lrt"
   fi
 fi
 
+if test "x$win_build" = "xyes" && test "x$enable_libaria2" = "xyes"; then
+  # Creating dll needs this
+  LDFLAGS="$LDFLAGS -no-undefined"
+fi
+
 AC_CONFIG_FILES([Makefile
 		src/Makefile
 		src/libaria2.pc