gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

configure.in (2013B)


      1 dnl
      2 dnl libresample configure.in script
      3 dnl
      4 dnl Dominic Mazzoni
      5 dnl
      6 
      7 dnl Require autoconf >= 2.13
      8 AC_PREREQ(2.13)
      9 
     10 dnl Init autoconf and make sure configure is being called
     11 dnl from the right directory
     12 AC_INIT([src/resample.c])
     13 
     14 dnl Checks for programs.
     15 AC_PROG_CC
     16 AC_PROG_CPP
     17 AC_PROG_RANLIB
     18 
     19 AC_PATH_PROG(AR, ar, no)
     20 if [[ $AR = "no" ]] ; then
     21     AC_MSG_ERROR("Could not find ar - needed to create a library");
     22 fi
     23 
     24 AC_SUBST(TARGETS)
     25 TARGETS="libresample.a tests/testresample"
     26 
     27 AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [enable tests using libsndfile and libsamplerate]), test_arg="yes", test_arg="no")
     28 
     29 if [[ x$test_arg = "xyes" ]] ; then
     30 	AC_CHECK_LIB(sndfile, sf_open, have_libsndfile=yes, have_libsndfile=no)
     31 	AC_CHECK_HEADER(sndfile.h, , have_libsndfile=no)
     32 
     33 	if [[ $have_libsndfile = "yes" ]] ; then
     34 		TARGETS="$TARGETS tests/resample-sndfile"
     35 	fi
     36 	
     37 	AC_CHECK_LIB(samplerate, src_simple, have_libsamplerate=yes, have_libsamplerate=no)
     38 	AC_CHECK_HEADER(samplerate.h, , have_libsamplerate=no)
     39 
     40 	if [[ $have_libsamplerate = "yes" ]] ; then
     41 		TARGETS="$TARGETS tests/compareresample"
     42 	fi
     43 else
     44 	have_libsamplerate="no"
     45 	have_libsndfile="no"
     46 fi
     47 
     48 
     49 AC_CHECK_HEADERS(inttypes.h)
     50 
     51 AC_CONFIG_HEADER(src/config.h:src/configtemplate.h)
     52 AC_OUTPUT([Makefile])
     53 
     54 echo ""
     55 
     56 if [[ $have_libsamplerate = "yes" ]] ; then
     57 	echo "Configured to build tests/resample-sndfile using libsndfile"
     58 	echo ""
     59 else if [[ x$test_arg = x"yes" ]] ; then
     60 	echo "Could not find libsndfile - needed if you want to"
     61 	echo "compile tests/resample-sndfile"
     62 	echo ""
     63 	fi
     64 fi
     65 
     66 if [[ $have_libsamplerate = "yes" ]] ; then
     67 	echo "Configured to build tests/compareresample to compare against"
     68    echo "Erik de Castro Lopo's libsamplerate library."
     69 	echo ""
     70 else if [[ x$test_arg = x"yes" ]] ; then
     71 	echo "Could not find libsamplerate - only needed if you want to"
     72 	echo "compile tests/compareresample to compare their performance."
     73 	echo ""
     74 	fi
     75 fi
     76 
     77 echo "Type 'configure --help' to see options."
     78 echo ""
     79 echo "Type 'make' to build libresample."