aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-18 09:55:15 +0000
committerEric Wong <normalperson@yhbt.net>2006-07-18 09:55:15 +0000
commit47037c6ac95189fbeb5fc07cdd8e5ea69c00992a (patch)
treee2c11d4f854d5f806152bb853b4c4bf762c36901 /configure.ac
parent16c72e9742fabbadc393465fc8add6adcbac0796 (diff)
downloadmpd-47037c6ac95189fbeb5fc07cdd8e5ea69c00992a.tar.gz
mpd-47037c6ac95189fbeb5fc07cdd8e5ea69c00992a.tar.xz
mpd-47037c6ac95189fbeb5fc07cdd8e5ea69c00992a.zip
Some more autotools fixes/hacks/workarounds
autogen.sh: Detect more strange paths for aclocal on different packaging systems. This should help encourage more people to run svn code on their systems. configure.ac: Tested on FreeBSD (6.1). Darwin, OpenBSD, NetBSD info gleaned off the Makefile distributed with git. m4/shout.m4: The Shout 2.2 port on a FreeBSD 6.1 machine seemed problematic when it's compiled against pthreads, so this is a gross hack to force -lpthread on it git-svn-id: https://svn.musicpd.org/mpd/trunk@4390 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 29 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 61ee82059..31e775c34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,13 +25,41 @@ AC_PROG_MAKE_SET
AM_CONFIG_HEADER(config.h)
+MPD_LIBS=""
MPD_CFLAGS=""
case "$CC" in
*gcc*)
MPD_CFLAGS="-Wall"
;;
esac
-MPD_LIBS=""
+
+local_lib=
+local_include=
+
+# aren't autotools supposed to be smart enough to figure this out?
+# oh well, the git-core Makefile managed to do some of the work for us :)
+case "$host_os" in
+darwin*)
+ local_lib='/sw/lib /opt/local/lib'
+ local_include='/sw/include /opt/local/include'
+ ;;
+freebsd* | openbsd*)
+ local_lib=/usr/local/lib
+ local_include=/usr/local/include
+ ;;
+netbsd*)
+ local_lib=/usr/pkg/lib
+ local_include=/usr/pkg/include
+ LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/pkg/lib"
+ ;;
+esac
+
+for d in $local_lib; do
+ test -d "$d" && LDFLAGS="$LDFLAGS -L$d"
+done
+for d in $local_include; do
+ test -d "$d" && CFLAGS="$CFLAGS -I$d"
+done
AC_ARG_ENABLE(ao,[ --enable-ao enable support for libao (default: disable)],[enable_ao=$enableval],[enable_ao=no])
AC_ARG_ENABLE(shout,[ --disable-shout disable support for streaming through shout (default: enable)],[enable_shout=$enableval],[enable_shout=yes])