aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure130
-rw-r--r--configure.ac63
2 files changed, 121 insertions, 72 deletions
diff --git a/configure b/configure
index 5239490..6ae194a 100755
--- a/configure
+++ b/configure
@@ -869,7 +869,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pd-dir=path pd header path (default=/usr/local/include)
- --with-flext-dir=path flext headers path (default=/usr/local/lib/pd/flext)
+ --with-flext-dir=path flext headers path (default=/usr/local/include/flext)
--with-flext-sys=<N> 1 for Max/Msp, 2 for PD (default=2)
Some influential environment variables:
@@ -3528,25 +3528,17 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo
-echo "$CPPFLAGS"
-echo "$CXXFLAGS"
-echo "$CFLAGS"
-echo "$LDFLAGS"
-echo
-
have_vorbis=no
have_mad=no
have_flc=no
flext_sys=2
-flext_dir=/usr/local/lib/pd/flext
+flext_dir=/usr/local/include/flext
flext_shared=yes
-
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
@@ -3626,12 +3618,12 @@ else
pd_suffix=pd_linux
;;
powerpc-*-linux*)
- CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+ CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
LDFLAGS="$LDFLAGS -shared"
pd_suffix=pd_linux
;;
*-*-linux*)
- CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+ CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
LDFLAGS="$LDFLAGS -shared"
pd_suffix=pd_linux
;;
@@ -3653,11 +3645,8 @@ fi
-echo
echo "Using cppflags= $CPPFLAGS"
echo "Using ldflags= $LDFLAGS"
-echo
-
@@ -4406,7 +4395,7 @@ else
echo
echo "found libsamplerate, but didn't find header. make sure samplerate.h is somewhere"
- echo "that can be found and try configure again."
+ echo "that can be found and try configure again. on debian, do: apt-get install libsamplerate0-dev"
echo
exit
@@ -4565,7 +4554,7 @@ else
SRC_LIBS=""
echo "you need libsamplerate. download it here <http://www.mega-nerd.com/SRC/>"
- echo
+ echo "on debian, do: apt-get install libsamplerate0-dev"
exit
fi
@@ -5111,6 +5100,7 @@ fi
+echo "checking for old flext libraries"
echo "$as_me:$LINENO: checking for AddOutSignal in -lflext" >&5
echo $ECHO_N "checking for AddOutSignal in -lflext... $ECHO_C" >&6
@@ -5184,37 +5174,105 @@ fi
if test "$have_flext" = "yes"; then
if test "$flext_shared" = "yes"; then
FLEXT_LIBS="-lflext"
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM"
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_NOGLOBALNEW"
else
echo
echo "FLEXT is not setup for dynamic linking, you should think about using this!"
echo "try configure --enable-flext-shared"
echo
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM"
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_NOGLOBALNEW"
FLEXT_LIBS=""
fi
else
- if test "$flext_shared" = "yes"; then
- echo
- echo "you want to link to FLEXT dynamicaly, a very good idea, but..."
- echo "...configure couldn't find the FLEXT lib. Taking your word for it."
- echo "This seems to be normal on linux. Don't know why it happens."
- echo "just make sure you have the libflext.so in one of the paths listed"
- echo "under /etc/ld.so.conf (for linux). and, as root do ldconfig"
- echo
- FLEXT_LIBS="-lflext"
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM"
+ echo "$as_me:$LINENO: checking for AddOutSignal in -lflext-pd" >&5
+echo $ECHO_N "checking for AddOutSignal in -lflext-pd... $ECHO_C" >&6
+if test "${ac_cv_lib_flext_pd_AddOutSignal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lflext-pd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char AddOutSignal ();
+int
+main ()
+{
+AddOutSignal ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_flext_pd_AddOutSignal=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_flext_pd_AddOutSignal=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_flext_pd_AddOutSignal" >&5
+echo "${ECHO_T}$ac_cv_lib_flext_pd_AddOutSignal" >&6
+if test $ac_cv_lib_flext_pd_AddOutSignal = yes; then
+ have_flext_pd=yes
+else
+ have_flext_pd=no
+fi
+
+ if test "$have_flext_pd" = "yes"; then
+ echo "setting up for newer flext-pd"
+ FLEXT_LIBS="-lflext-pd"
+ if test "$flext_shared" = "yes"; then
+ echo "setting up flext-pd as a shared lib."
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM -I$flext_dir"
+ else
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM -I$flext_dir"
+ fi
else
echo
- echo "FLEXT is now setup to link statically. not the best idea, but it works"
+ echo "no flext or flext-pd libraries found! build will probably fail."
echo
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM"
- FLEXT_LIBS="$flext_dir/libflext_t.a"
fi
fi
-
-
+echo
+echo "If $flext_dir does not have the flext header files in it."
+echo "do: ./configure --with-flext-dir=/path/to/flext/headers"
+echo
@@ -7195,9 +7253,9 @@ echo "_________________readanysf~__________________"
if test "$flext_sys" = "1"; then
- echo " + FLEXT support for Max/MSP @ $flext_dir"
+ echo " + FLEXT support for Max/MSP "
elif test "$flext_sys" = "2"; then
- echo " + FLEXT support for PureData @ $flext_dir"
+ echo " + FLEXT support for PureData "
fi
echo " + Wav,Aiff,Next decoding support (always)"
diff --git a/configure.ac b/configure.ac
index 4873300..ac8db59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,7 @@ AC_INIT([readanysf~], [0.15],
[readanysf~]) dnl last part is the tarname
+dnl AC_LANG_PUSH([C++])
dnl ----------------------------------
dnl ---- have your makefiles call recursively
@@ -32,25 +33,17 @@ dnl AC_PROG_AWK
dnl AC_PROG_LN_S
dnl AC_PROG_RANLIB
-echo
-echo "$CPPFLAGS"
-echo "$CXXFLAGS"
-echo "$CFLAGS"
-echo "$LDFLAGS"
-echo
-
have_vorbis=no
have_mad=no
have_flc=no
flext_sys=2
-flext_dir=/usr/local/lib/pd/flext
+flext_dir=/usr/local/include/flext
flext_shared=yes
-
dnl ------------------------------------------
dnl ---- do some magic to gues the host opsys
dnl ---- taken from libvorbis configure.in
@@ -84,12 +77,12 @@ else
pd_suffix=pd_linux
;;
powerpc-*-linux*)
- CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+ CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
LDFLAGS="$LDFLAGS -shared"
pd_suffix=pd_linux
;;
*-*-linux*)
- CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
+ CPPFLAGS="$CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
LDFLAGS="$LDFLAGS -shared"
pd_suffix=pd_linux
;;
@@ -113,11 +106,8 @@ fi
dnl -dylib -dynamic -flat_namespace -undefined suppress
-echo
echo "Using cppflags= $CPPFLAGS"
echo "Using ldflags= $LDFLAGS"
-echo
-
@@ -167,7 +157,7 @@ dnl ---- add Flext includes and lib dir
dnl ---- usually /usr/local/lib/pd/flext
dnl ------------------------------------------
AC_ARG_WITH(flext_dir,
- [ --with-flext-dir=path flext headers path (default=/usr/local/lib/pd/flext) ],
+ [ --with-flext-dir=path flext headers path (default=/usr/local/include/flext) ],
[
flext_dir=$withval
CPPFLAGS="$CPPFLAGS -I$withval"
@@ -214,7 +204,7 @@ AC_CHECK_LIB(samplerate, src_is_valid_ratio, [
AC_CHECK_HEADER(samplerate.h, [have_src_hdr=yes ], [
echo
echo "found libsamplerate, but didn't find header. make sure samplerate.h is somewhere"
- echo "that can be found and try configure again."
+ echo "that can be found and try configure again. on debian, do: apt-get install libsamplerate0-dev"
echo
exit
])
@@ -229,7 +219,7 @@ AC_CHECK_LIB(samplerate, src_is_valid_ratio, [
], [
SRC_LIBS=""
echo "you need libsamplerate. download it here <http://www.mega-nerd.com/SRC/>"
- echo
+ echo "on debian, do: apt-get install libsamplerate0-dev"
exit
])
])
@@ -298,6 +288,7 @@ dnl echo; echo "HAVE THE FUCKING FLAC LIB"; echo
])
+echo "checking for old flext libraries"
dnl ------------------------------------------
dnl ---- Checks for FLEXT libraries.
@@ -306,37 +297,37 @@ AC_CHECK_LIB(flext, AddOutSignal, [have_flext=yes ], [have_flext=no])
if test "$have_flext" = "yes"; then
if test "$flext_shared" = "yes"; then
FLEXT_LIBS="-lflext"
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM"
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_NOGLOBALNEW"
else
echo
echo "FLEXT is not setup for dynamic linking, you should think about using this!"
echo "try configure --enable-flext-shared"
echo
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM"
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_NOGLOBALNEW"
FLEXT_LIBS=""
fi
else
- if test "$flext_shared" = "yes"; then
- echo
- echo "you want to link to FLEXT dynamicaly, a very good idea, but..."
- echo "...configure couldn't find the FLEXT lib. Taking your word for it."
- echo "This seems to be normal on linux. Don't know why it happens."
- echo "just make sure you have the libflext.so in one of the paths listed"
- echo "under /etc/ld.so.conf (for linux). and, as root do ldconfig"
- echo
- FLEXT_LIBS="-lflext"
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM"
+ AC_CHECK_LIB(flext-pd, AddOutSignal, [have_flext_pd=yes ], [have_flext_pd=no])
+ if test "$have_flext_pd" = "yes"; then
+ echo "setting up for newer flext-pd"
+ FLEXT_LIBS="-lflext-pd"
+ if test "$flext_shared" = "yes"; then
+ echo "setting up flext-pd as a shared lib."
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_SHARED -DFLEXT_USE_CMEM -I$flext_dir"
+ else
+ FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM -I$flext_dir"
+ fi
else
echo
- echo "FLEXT is now setup to link statically. not the best idea, but it works"
+ echo "no flext or flext-pd libraries found! build will probably fail."
echo
- FLEXT_CFLAGS="-DFLEXT_SYS=$flext_sys -DFLEXT_THREADS -DFLEXT_USE_CMEM"
- FLEXT_LIBS="$flext_dir/libflext_t.a"
fi
fi
-
-
+echo
+echo "If $flext_dir does not have the flext header files in it."
+echo "do: ./configure --with-flext-dir=/path/to/flext/headers"
+echo
AC_SUBST(FLEXT_LIBS)
@@ -373,9 +364,9 @@ echo "_________________readanysf~__________________"
if test "$flext_sys" = "1"; then
- echo " + FLEXT support for Max/MSP @ $flext_dir"
+ echo " + FLEXT support for Max/MSP "
elif test "$flext_sys" = "2"; then
- echo " + FLEXT support for PureData @ $flext_dir"
+ echo " + FLEXT support for PureData "
fi
echo " + Wav,Aiff,Next decoding support (always)"