From cdbd4f009555a492b2bd3aa703124e3f48eeff43 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 24 Oct 2013 00:13:05 +0900 Subject: [PATCH] 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. --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bf98fad2..c35bcc08 100644 --- a/configure.ac +++ b/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