changeset 1622:55011fbbd8cb trunk

[svn] - detect what $(SHARED_SUFFIX) should be. - detect if we are using Apple-GCC.
author nenolod
date Wed, 06 Sep 2006 12:57:50 -0700
parents fae6e0cfcc77
children e2eb234cb999
files ChangeLog configure.ac
diffstat 2 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Sep 05 19:57:18 2006 -0700
+++ b/ChangeLog	Wed Sep 06 12:57:50 2006 -0700
@@ -1,3 +1,12 @@
+2006-09-06 02:57:18 +0000  George Averill <nhjm449@gmail.com>
+  revision [2173]
+  - Reapply r2161
+  
+
+  Changes:        Modified:
+  +3 -1           trunk/libaudacious/Makefile.in  
+
+
 2006-09-05 16:18:30 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2171]
   - don't be picky about what aclocal version we are using.
--- a/configure.ac	Tue Sep 05 19:57:18 2006 -0700
+++ b/configure.ac	Wed Sep 06 12:57:50 2006 -0700
@@ -187,6 +187,39 @@
 AM_CONDITIONAL(USE_IPV6,test "x$enable_ipv6" = xyes)
 AC_SUBST(USE_IPV6)
 
+dnl plugin stuff
+dnl ========================
+
+dnl Ok, first we find out what flags we need to use.
+AC_MSG_CHECKING([for what extension and flags to use for plugin compilation])
+case "$target" in
+	*-apple-*)
+		AC_MSG_RESULT([Mac OS X: -fPIC -bundle, .dylib])
+		PICFLAGS="-fPIC -bundle"
+		PICLDFLAGS="-fPIC -bundle"
+		SHARED_SUFFIX=".dylib"
+		;;
+	*)
+		AC_MSG_RESULT([libdl-compatible: -fPIC -DPIC -shared, .so])
+		PICFLAGS="-fPIC -DPIC -shared"
+		PICLDFLAGS="-fPIC -DPIC -shared"
+		SHARED_SUFFIX=".so"
+		;;
+esac
+AC_SUBST(PICFLAGS)
+AC_SUBST(SHARED_SUFFIX)
+
+AC_MSG_CHECKING([if you are running Apple-GCC])
+case "$target" in
+	*-apple-*)
+		AC_MSG_RESULT([yes, sorry you poor bastard])
+		LDFLAGS="$LDFLAGS -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
+		;;
+	*)
+		AC_MSG_RESULT([no])
+		;;
+esac
+
 dnl chardet support
 dnl ========================
 AC_ARG_ENABLE(chardet,