Set correct LDFLAGS for OS X.
authorAndrej Kacian <ticho@claws-mail.org>
Thu, 18 Aug 2016 18:39:30 +0000 (20:39 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Thu, 18 Aug 2016 18:48:34 +0000 (20:48 +0200)
Commit also simplifies LDFLAGS for Windows,
moving them from src/Makefile.am to configure.ac.

Closes bug #3665.

configure.ac
src/Makefile.am

index 78fc268..5965357 100644 (file)
@@ -110,18 +110,25 @@ dnl ******************************
 dnl AC_CANONICAL_HOST
 
 dnl Copied from the official gtk+-2 configure.in
-AC_MSG_CHECKING([for some Win32 platform])
+AC_MSG_CHECKING([for host platform])
 case "$host" in
   *-*-mingw*|*-*-cygwin*)
     platform_win32=yes
-    LDFLAGS="$LDFLAGS -mwindows"
+    LDFLAGS="$LDFLAGS -mwindows -Wl,--export-all-symbols"
     ;;
+       *-apple-*)
+               platform_osx=yes
+               LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+               ;;
   *)
     platform_win32=no
+               platform_osx=no
+               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     ;;
 esac
-AC_MSG_RESULT([$platform_win32])
 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
+AM_CONDITIONAL(PLATFORM_OSX, test x"$platform_osx" = x"yes")
+AC_MSG_RESULT([$host])
 
 AC_MSG_CHECKING([for native Win32])
 case "$host" in
index b840f34..d2f9955 100644 (file)
@@ -546,14 +546,8 @@ IFLAGS = \
        -I$(srcdir)/gtk \
        -I$(srcdir)/etpan
 
-if PLATFORM_WIN32
-arch_ldflags := -Wl,--export-all-symbols
-else
-arch_ldflags := -Wl,--export-dynamic
-endif
-
 claws_mail_LDFLAGS = \
-       $(arch_ldflags) $(claws_mail_res_ldflag)
+       $(claws_mail_res_ldflag)
 
 claws_mail_DEPENDENCIES = $(claws_mail_deps) \
        $(etpan_library) \