diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/configure.in b/configure.in index ec86fcb..7afc191 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,9 @@ AC_INIT([libxtract], [0.11], [bugs@postlude.co.uk]) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_CONFIG_HEADER(config.h) AC_PROG_CC +AC_PROG_LIBTOOL AC_PROG_INSTALL +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_ENABLE_STATIC(no) AC_ENABLE_SHARED(yes) AC_PROG_LIBTOOL @@ -12,7 +14,7 @@ AC_PROG_LIBTOOL # [ if test $withval = "yes"; then with_vector=yes ; # else with_vector=no ; fi ], with_vector=no) -AC_CHECK_HEADERS([math.h]) +AC_CHECK_HEADERS([math.h, stdlib.h, stdio.h]) AC_CHECK_PROG([DOXYGEN], [doxygen], [doc], []) AC_SUBST(DOXYGEN) @@ -47,7 +49,7 @@ AC_ARG_ENABLE(pd_example, # age to 0. XTRACT_SO_VERSION=0:0:0 -CFLAGS="$CFLAGS -pedantic -ansi" +CFLAGS="$CFLAGS -pedantic -ansi -O3" LDFLAGS="$LDFLAGS -lm" AC_ARG_WITH(pd_dir, @@ -82,6 +84,7 @@ if [[ "$vector" = "true" ]] ; then ]) fi + AM_CONDITIONAL(BUILD_VECTOR, test "x${vector}" = 'xtrue') dnl Are we building the PD examples? @@ -95,12 +98,21 @@ if [[ "$pd_example" = "true" ]] ; then echo exit ]) -dnl At some point we need to support other platforms, and include checks -dnl pd_suffix=pd_linux fi AM_CONDITIONAL(BUILD_PD_EXAMPLE, test "x${pd_example}" = 'xtrue') +dnl Enable debugging (no) +AC_ARG_ENABLE(debug, + [ --enable-debug[[=value]] compile with debug [[default=no]]], + with_debug="yes", + with_debug="no") +if test "$with_debug" = "yes" +then + AC_DEFINE(DEBUG,1,[Define to enable debug]) + CFLAGS="-O0 -ggdb -g -pedantic -ansi" +fi + dnl ------------------------------------------ dnl ---- do some magic to gues the host opsys dnl ---- taken from libvorbis configure.in @@ -130,29 +142,35 @@ else case $host in *86-*-linux*) - PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1" - PD_LDFLAGS="$PD_LDFLAGS -shared" + PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes" + PD_LDFLAGS="$PD_LDFLAGS -shared -export_dynamic" dnl we could test for bad glibc here, but don't PD_SUFFIX=pd_linux ;; powerpc-*-linux*) - PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 " + PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes" PD_LDFLAGS="$PD_LDFLAGS -shared" PD_SUFFIX=pd_linux ;; *-*-linux*) - PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC" - PD_LDFLAGS="$PD_LDFLAGS -shared" + PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -fPIC" + PD_LDFLAGS="$PD_LDFLAGS -shared -export_dynamic" PD_SUFFIX=pd_linux ;; sparc-sun-*) echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet" ;; - *-*-darwin*) - PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 " - PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined suppress -flat_namespace" + *86-*-darwin*) + PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes" + PD_LDFLAGS="$PD_LDFLAGS -bundle -arch i686 -undefined suppress -flat_namespace" + PD_SUFFIX=pd_darwin + ;; + *-*-darwin*) + PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes" + PD_LDFLAGS="$PD_LDFLAGS -bundle -arch ppc -undefined suppress -flat_namespace" PD_SUFFIX=pd_darwin -;; + ;; + *) dnl assume unix PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1" @@ -178,17 +196,14 @@ echo echo "**************************************************************" echo "Summary:" +echo you are using the ${host} architecture -if test "${BUILD_VECTOR}" = "1"; then +if test "$vector" = "true"; then echo "Fftw3: yes (using fftw3f)" else -if test "${BUILD_VECTOR}" = "1"; then - echo "Fftw3: yes (not using fftw3f)" -else - echo "Fftw3: no (that should not happen)" -fi + echo "Fftw3: no (not using fftw3, the vector functions will not work)" fi -if test "${BUILD_PD_EXAMPLE}" = "1"; then +if test "$pd_example" = "true"; then echo "PD external: yes" else echo "PD external: no" |