comparison configure.in @ 4:46efa5536d04

Added Pure Data example
author Jamie Bullock <jamie@postlude.co.uk>
date Thu, 05 Oct 2006 16:48:38 +0000
parents 819937ea6359
children 0a461b85bbb9
comparison
equal deleted inserted replaced
3:0c9a6c2c3e06 4:46efa5536d04
1 AC_PREREQ(2.13) 1 AC_PREREQ(2.13)
2 AC_INIT([libxtract], [0.10], [bugs@postlude.co.uk]) 2 AC_INIT([libxtract], [0.11], [bugs@postlude.co.uk])
3 3
4 AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 4 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
5 AM_CONFIG_HEADER(config.h) 5 AM_CONFIG_HEADER(config.h)
6 AC_PROG_CC 6 AC_PROG_CC
7 AC_PROG_INSTALL 7 AC_PROG_INSTALL
22 yes) vector=true ;; 22 yes) vector=true ;;
23 no) vector=false ;; 23 no) vector=false ;;
24 *) AC_MSG_ERROR(bad value ${enableval} for --enable-vector) ;; 24 *) AC_MSG_ERROR(bad value ${enableval} for --enable-vector) ;;
25 esac],[vector=false]) 25 esac],[vector=false])
26 26
27 AC_ARG_ENABLE(pd_example,
28 [ --enable-pd_example Compile the Pure Data external example],
29 [case "${enableval}" in
30 yes) vector=true ;;
31 no) vector=false ;;
32 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pd_external) ;;
33 esac],[vector=false])
34
35
36
37 # libtool version: current:revision:age
38 #
39 # If the library source code has changed at all since the last update, then
40 # increment revision (`c:r:a' becomes `c:r+1:a').
41 #
42 # If any interfaces have been added, removed, or changed since the last update,
43 # increment current, and set revision to 0.
44 #
45 # If any interfaces have been added since the last public release, then
46 # increment age.
47 #
48 # If any interfaces have been removed since the last public release, then set
49 # age to 0.
27 XTRACT_SO_VERSION=0:0:0 50 XTRACT_SO_VERSION=0:0:0
51
28 CFLAGS="-pedantic -ansi" 52 CFLAGS="-pedantic -ansi"
29 LDFLAGS="-lm" 53 LDFLAGS="-lm"
30 54
31 dnl Are we building with fftw? 55 dnl Are we building with fftw?
32 #if [[ "$with_vector" = "yes" ]] ; then 56 #if [[ "$with_vector" = "yes" ]] ; then
35 AC_DEFINE([BUILD_VECTOR], [1], [Build the vector functions]) 59 AC_DEFINE([BUILD_VECTOR], [1], [Build the vector functions])
36 fi 60 fi
37 61
38 AM_CONDITIONAL(BUILD_VECTOR, test "x${vector}" = 'xtrue') 62 AM_CONDITIONAL(BUILD_VECTOR, test "x${vector}" = 'xtrue')
39 63
64 if [[ "$pd_example" = "true" ]] ; then
65 AC_DEFINE([BUILD_PD_EXAMPLE], [1], [Build the pd example])
66 dnl At some point we need to support other platforms, and include checks
67 pd_suffix=pd_linux
68 fi
69
70 dnl ------------------------------------------
71 dnl ---- add PureData includes dir
72 dnl ---- usually /usr/local/include
73 dnl ------------------------------------------
74 AC_ARG_WITH(pd_dir,
75 [ --with-pd-dir=path pd header path (default=/usr/local/include) ],
76 [
77 CPPFLAGS="$CPPFLAGS -I$withval"
78 echo
79 echo "pd dir is $withval"
80 echo
81 ])
82
83 dnl ------------------------------------------
84 dnl ---- check for PureData Header
85 dnl ------------------------------------------
86 AC_CHECK_HEADER(m_pd.h, [have_pd_hdr=yes ], [
87 have_pd_hdr=no
88 echo
89 echo "no m_pd.h header found. try with option --with-pd-dir=/path/to/pd/src"
90 echo
91 exit
92 ])
93
94 AM_CONDITIONAL(BUILD_PD_EXAMPLE, test "x${pd_example}" = 'xtrue')
95
96 dnl ------------------------------------------
97 dnl ---- do some magic to gues the host opsys
98 dnl ---- taken from libvorbis configure.in
99 dnl ------------------------------------------
100 AC_CANONICAL_HOST
101
102 PD_LDFLAGS="$PD_LDFLAGS -L/usr/local/lib -ldl"
103 if test -z "$GCC"; then
104 case $host in
105 *-*-irix*)
106 dnl If we're on IRIX, we wanna use cc even if gcc
107 dnl is there (unless the user has overriden us)...
108 if test -z "$CC"; then
109 CC=cc
110 fi
111 ;;
112 sparc-sun-solaris*)
113 PD_CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
114 ;;
115 *)
116 PD_CFLAGS="-O"
117 ;;
118 esac
119 else
120
121 case $host in
122 *86-*-linux*)
123 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
124 PD_LDFLAGS="$PD_LDFLAGS -shared"
125 dnl we could test for bad glibc here, but don't
126 pd_suffix=pd_linux
127 ;;
128 powerpc-*-linux*)
129 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 "
130 PD_LDFLAGS="$PD_LDFLAGS -shared"
131 pd_suffix=pd_linux
132 ;;
133 *-*-linux*)
134 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC"
135 PD_LDFLAGS="$PD_LDFLAGS -shared"
136 pd_suffix=pd_linux
137 ;;
138 sparc-sun-*)
139 echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
140 ;;
141 *-*-darwin*)
142 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
143 PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined suppress -flat_namespace"
144 pd_suffix=pd_darwin
145 ;;
146 *)
147 dnl assume unix
148 PD_CPPFLAGS="$PD_CPPFLAGS -DUNIX -Wno-deprecated -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
149 PD_LDFLAGS="$PD_LDFLAGS -shared"
150 pd_suffix=pd_linux
151 ;;
152 esac
153 fi
154
40 AC_CONFIG_FILES([doc/documentation.doxygen]) 155 AC_CONFIG_FILES([doc/documentation.doxygen])
41 156
42 AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile) 157 AC_OUTPUT(Makefile src/Makefile xtract/Makefile doc/Makefile examples/puredata/Makefile)