File: configure.in

package info (click to toggle)
audacity 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 44,240 kB
  • sloc: cpp: 182,841; ansic: 120,375; sh: 26,421; lisp: 7,495; makefile: 1,606; python: 240; xml: 104; perl: 31
file content (79 lines) | stat: -rw-r--r-- 2,013 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
dnl
dnl libresample configure.in script
dnl
dnl Dominic Mazzoni
dnl

dnl Require autoconf >= 2.13
AC_PREREQ(2.13)

dnl Init autoconf and make sure configure is being called
dnl from the right directory
AC_INIT([src/resample.c])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB

AC_PATH_PROG(AR, ar, no)
if [[ $AR = "no" ]] ; then
    AC_MSG_ERROR("Could not find ar - needed to create a library");
fi

AC_SUBST(TARGETS)
TARGETS="libresample.a tests/testresample"

AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [enable tests using libsndfile and libsamplerate]), test_arg="yes", test_arg="no")

if [[ x$test_arg = "xyes" ]] ; then
	AC_CHECK_LIB(sndfile, sf_open, have_libsndfile=yes, have_libsndfile=no)
	AC_CHECK_HEADER(sndfile.h, , have_libsndfile=no)

	if [[ $have_libsndfile = "yes" ]] ; then
		TARGETS="$TARGETS tests/resample-sndfile"
	fi
	
	AC_CHECK_LIB(samplerate, src_simple, have_libsamplerate=yes, have_libsamplerate=no)
	AC_CHECK_HEADER(samplerate.h, , have_libsamplerate=no)

	if [[ $have_libsamplerate = "yes" ]] ; then
		TARGETS="$TARGETS tests/compareresample"
	fi
else
	have_libsamplerate="no"
	have_libsndfile="no"
fi


AC_CHECK_HEADERS(inttypes.h)

AC_CONFIG_HEADER(src/config.h:src/configtemplate.h)
AC_OUTPUT([Makefile])

echo ""

if [[ $have_libsamplerate = "yes" ]] ; then
	echo "Configured to build tests/resample-sndfile using libsndfile"
	echo ""
else if [[ x$test_arg = x"yes" ]] ; then
	echo "Could not find libsndfile - needed if you want to"
	echo "compile tests/resample-sndfile"
	echo ""
	fi
fi

if [[ $have_libsamplerate = "yes" ]] ; then
	echo "Configured to build tests/compareresample to compare against"
   echo "Erik de Castro Lopo's libsamplerate library."
	echo ""
else if [[ x$test_arg = x"yes" ]] ; then
	echo "Could not find libsamplerate - only needed if you want to"
	echo "compile tests/compareresample to compare their performance."
	echo ""
	fi
fi

echo "Type 'configure --help' to see options."
echo ""
echo "Type 'make' to build libresample."