annotate configure.ac @ 147:805ee2abcd5f

run FFT in place on the data vector
author Jamie Bullock <jamie@jamiebullock.com>
date Wed, 09 Jan 2013 12:54:28 +0000
parents 2663eac093a5
children 0881cd514c9c
rev   line source
jamie@128 1 AC_PREREQ(2.13)
jamie@128 2 # Increment for major API changes, release status changes
jamie@128 3 m4_define(libxtract_major_version, 0)
jamie@128 4 # Increment for feature additions and enhancements
jamie@140 5 m4_define(libxtract_minor_version, 7)
jamie@128 6 # Increment for fixes
jamie@140 7 m4_define(libxtract_fix_version, 0)
jamie@128 8 # Development status
jamie@128 9 m4_define(libIntegra_dev_status, [beta])
jamie@128 10
jamie@128 11 m4_define(libxtract_version, libxtract_major_version.libxtract_minor_version.libxtract_fix_version)
jamie@128 12
jamie@128 13 PACKAGE=libxtract
jamie@128 14
jamie@128 15 AC_INIT([libxtract], [libxtract_version], [libxtract-devel@lists.sourceforge.net])
jamie@128 16 AC_DEFINE(LIBXTRACT_VERSION, libxtract_version, [LibXtract Version])
jamie@128 17 AM_INIT_AUTOMAKE(1.6)
jamie@128 18 AM_CONFIG_HEADER(config.h)
jamie@128 19 AC_CONFIG_MACRO_DIR([m4])
jamie@128 20 AC_PROG_CC
jamie@128 21 AC_PROG_LIBTOOL
jamie@128 22 AC_PROG_INSTALL
jamie@128 23 AC_C_BIGENDIAN
jamie@128 24 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
jamie@128 25 AC_ENABLE_STATIC(no)
jamie@128 26 AC_ENABLE_SHARED(yes)
jamie@128 27 AC_PROG_LIBTOOL
jamie@128 28 AC_CHECK_HEADERS([math.h, stdlib.h, stdio.h])
jamie@145 29
jamie@145 30 dnl DOXYGEN support
jamie@145 31
jamie@145 32 AC_CHECK_PROGS([DOXYGEN], [doxygen])
jamie@145 33
jamie@145 34 if test -z "$DOXYGEN";
jamie@145 35 then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
jamie@145 36 else
jamie@145 37 AC_MSG_NOTICE([Doxygen found - continuing with Doxygen support])
jamie@145 38 fi
jamie@145 39
jamie@145 40 AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
jamie@145 41 AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/documentation.doxygen])])
jamie@145 42
jamie@145 43 AC_SUBST(HAVE_DOXYGEN)
jamie@145 44 dnl --enable flags
jamie@128 45
jamie@128 46 AC_ARG_ENABLE(pd_example,
jamie@128 47 [ --enable-pd_example Compile the Pure Data external example],
jamie@128 48 [case "${enableval}" in
jamie@128 49 yes) pd_example=true ;;
jamie@128 50 no) pd_example=false ;;
jamie@128 51 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pd_external) ;;
jamie@128 52 esac],[pd_example=false])
jamie@128 53
jamie@128 54 AC_ARG_ENABLE(simpletest,
jamie@128 55 [ --enable-simpletest Compile the 'simpletest' example],
jamie@128 56 [case "${enableval}" in
jamie@128 57 yes) simpletest=true ;;
jamie@128 58 no) simpletest=false ;;
jamie@128 59 *) AC_MSG_ERROR(bad value ${enableval} for --enable-simpletest) ;;
jamie@128 60 esac],[simpletest=false])
jamie@128 61
jamie@128 62 # libtool version: current:revision:age
jamie@128 63 #
jamie@128 64 # If the library source code has changed at all since the last update, then
jamie@128 65 # increment revision (`c:r:a' becomes `c:r+1:a').
jamie@128 66 #
jamie@128 67 # If any interfaces have been added, removed, or changed since the last update,
jamie@128 68 # increment current, and set revision to 0.
jamie@128 69 #
jamie@128 70 # If any interfaces have been added since the last public release, then
jamie@128 71 # increment age.
jamie@128 72 #
jamie@128 73 # If any interfaces have been removed since the last public release, then set
jamie@128 74 # age to 0.
jamie@128 75 XTRACT_SO_VERSION=0:0:0
jamie@128 76
jamie@128 77 CFLAGS="$CFLAGS -pedantic -ansi -fno-strict-aliasing -Wall -std=c99 -I/usr/local/include"
jamie@128 78 LDFLAGS="$LDFLAGS -lm"
jamie@128 79
jamie@128 80 AC_ARG_WITH(pd_dir,
jamie@128 81 [ --with-pd-dir=path pd header path (default=/usr/local/include) ],
jamie@128 82 [
jamie@128 83 CFLAGS="$CFLAGS -I$withval"
jamie@128 84 echo
jamie@128 85 echo "pd dir is $withval"
jamie@128 86 echo
jamie@128 87 ])
jamie@128 88
jamie@128 89 dnl set a specific java compiler
jamie@128 90 AC_ARG_WITH(javac,
jamie@128 91 [ --with-javac=compiler set a specific java compiler (determined automatically if not set) ],
jamie@128 92 [JAVAC="$withval"
jamie@128 93 echo
jamie@128 94 echo "JAVAC is set to $withval"
jamie@128 95 echo
jamie@128 96 ])
jamie@128 97
jamie@128 98 dnl If --enable-swig, make with java bindings
jamie@128 99 AC_ARG_WITH(java,
jamie@128 100 [ --with-java If --enable-swig - make with java bindings (default=no) ],
jamie@128 101 [with_java=true])
jamie@128 102
jamie@128 103 AM_CONDITIONAL(BUILD_JAVA, test "x${with_java}" = 'xtrue')
jamie@128 104
jamie@128 105 dnl If --enable-swig, make with java bindings
jamie@128 106 AC_ARG_WITH(python,
jamie@128 107 [ --with-python If --enable-swig - make with python bindings (default=no) ], [with_python=true])
jamie@128 108
jamie@128 109 AM_CONDITIONAL(BUILD_PYTHON, test "x${with_python}" = 'xtrue')
jamie@128 110
jamie@128 111
jamie@128 112 dnl are we building the simpletest example
jamie@128 113 if [[ "$simpletest" = "true" ]] ; then
jamie@128 114 AC_DEFINE([BUILD_SIMPLETEST], [1], [Build the simpletest example])
jamie@128 115 fi
jamie@128 116
jamie@128 117 AM_CONDITIONAL(BUILD_SIMPLETEST, test "x${simpletest}" = 'xtrue')
jamie@128 118
jamie@128 119 dnl Are we building the PD examples?
jamie@128 120 if [[ "$pd_example" = "true" ]] ; then
jamie@128 121 PD_SOURCES="xtract~.c"
jamie@128 122 AC_DEFINE([BUILD_PD_EXAMPLE], [1], [Build the pd example])
jamie@128 123 AC_CHECK_HEADER(m_pd.h, [have_pd_hdr=yes ], [
jamie@128 124 have_pd_hdr=no
jamie@128 125 echo
jamie@128 126 echo "no m_pd.h header found. try with option --with-pd-dir=/path/to/pd/src"
jamie@128 127 echo
jamie@128 128 exit
jamie@128 129 ])
jamie@128 130 fi
jamie@128 131
jamie@128 132 AM_CONDITIONAL(BUILD_PD_EXAMPLE, test "x${pd_example}" = 'xtrue')
jamie@128 133
jamie@128 134
jamie@128 135 dnl Enable debugging (no)
jamie@128 136 AC_ARG_ENABLE(debug,
jamie@128 137 [ --enable-debug[[=value]] compile with debug [[default=no]]],
jamie@128 138 with_debug="yes",
jamie@128 139 with_debug="no")
jamie@128 140 if test "$with_debug" = "yes"
jamie@128 141 then
jamie@128 142 AC_DEFINE(DEBUG,1,[Define to enable debug])
jamie@128 143 CFLAGS="$CFLAGS -O0 -ggdb -g -Werror"
jamie@128 144 fi
jamie@128 145
jamie@128 146 AC_ARG_ENABLE(swig,
jamie@128 147 [ --enable-swig Generate swig bindings],
jamie@128 148 [case "${enableval}" in
jamie@128 149 yes) swig=true ;;
jamie@128 150 no) swig=false ;;
jamie@128 151 *) AC_MSG_ERROR(bad value ${enableval} for --enable-swig) ;;
jamie@128 152 esac],[swig=false])
jamie@128 153
jamie@128 154
jamie@128 155
jamie@128 156 if [[ "$with_java" = "true" ]] ; then
jamie@128 157 if test "$JAVAC" = ""
jamie@128 158 then
jamie@128 159 AC_PROG_JAVAC
jamie@128 160 fi
jamie@128 161 if test "$JAVAC" = "javac"
jamie@128 162 then
jamie@128 163 AC_JNI_INCLUDE_DIR
jamie@128 164
jamie@128 165 for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
jamie@128 166 do
jamie@128 167 CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
jamie@128 168 done
jamie@128 169 fi
jamie@128 170 dnl AC_PROG_JAVAH
jamie@128 171 dnl AC_PATH_PROG(JAVAH,javah)
jamie@128 172 fi
jamie@128 173
jamie@128 174 if [[ "$with_python" = "true" ]] ; then
jamie@128 175 AM_PATH_PYTHON
jamie@128 176 SWIG_PYTHON
jamie@128 177 fi
jamie@128 178
jamie@128 179
jamie@128 180 AM_CONDITIONAL(BUILD_SWIG, test "x${swig}" = 'xtrue')
jamie@128 181
jamie@128 182 dnl SWIG stuff
jamie@128 183 if [[ "$swig" = "true" ]] ; then
jamie@133 184 AX_PKG_SWIG(1.3.21, [], [ AC_MSG_ERROR([SWIG is not installed]) ])
jamie@128 185 AC_DEFINE([BUILD_SWIG], [1], [Build the swig bindings])
jamie@128 186 fi
jamie@128 187
jamie@128 188 dnl Check for architecture endian-ness
jamie@128 189 #AC_C_BIGENDIAN(bigendian=true, bigendian=false, bigendian=undefined)
jamie@128 190 #if [[ "$is_bigendian" = "false" ]] ; then
jamie@128 191 # AC_DEFINE([WORDS_BIGENDIAN], [0], [Architecture is big endian])
jamie@128 192 #else
jamie@128 193 # AC_DEFINE([WORDS_BIGENDIAN], [1], [Architecture is not big endian])
jamie@128 194 #fi
jamie@128 195
jamie@128 196
jamie@128 197 dnl ------------------------------------------
jamie@128 198 dnl ---- do some magic to gues the host opsys
jamie@128 199 dnl ---- taken from libvorbis configure.in
jamie@128 200 dnl ------------------------------------------
jamie@128 201 dnl AC_CANONICAL_HOST
jamie@128 202
jamie@128 203 dnl AC_SUBST(PD_CFLAGS,"$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1")
jamie@128 204 dnl AC_SUBST(PD_LDFLAGS,"$PD_LDFLAGS -shared")
jamie@128 205 dnl pd_ldflags="$PD_LDFLAGS -L/usr/local/lib -ldl"
jamie@128 206 if test -z "$GCC"; then
jamie@128 207 case $host in
jamie@128 208 *-*-irix*)
jamie@128 209 dnl If we're on IRIX, we wanna use cc even if gcc
jamie@128 210 dnl is there (unless the user has overriden us)...
jamie@128 211 if test -z "$CC"; then
jamie@128 212 CC=cc
jamie@128 213 fi
jamie@128 214 ;;
jamie@128 215 sparc-sun-solaris*)
jamie@128 216 PD_CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
jamie@128 217 ;;
jamie@128 218 *)
jamie@128 219 PD_CFLAGS="-O"
jamie@128 220 ;;
jamie@128 221 esac
jamie@128 222 else
jamie@128 223
jamie@128 224 case $host in
jamie@128 225 *86-*-linux*)
jamie@128 226 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused"
jamie@128 227 PD_LDFLAGS="$PD_LDFLAGS -shared"
jamie@128 228 dnl we could test for bad glibc here, but don't
jamie@128 229 PD_SUFFIX=pd_linux
jamie@128 230 ;;
jamie@128 231 powerpc-*-linux*)
jamie@128 232 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes"
jamie@128 233 PD_LDFLAGS="$PD_LDFLAGS -shared"
jamie@128 234 PD_SUFFIX=pd_linux
jamie@128 235 ;;
jamie@128 236 *-*-linux*)
jamie@128 237 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -fPIC"
jamie@128 238 PD_LDFLAGS="$PD_LDFLAGS -shared -export_dynamic"
jamie@128 239 PD_SUFFIX=pd_linux
jamie@128 240 ;;
jamie@128 241 sparc-sun-*)
jamie@128 242 echo "YOU HAVE A SPARC STATION, not setting any flags, not supported yet"
jamie@128 243 ;;
jamie@131 244 dnl *86-*-darwin*)
jamie@131 245 dnl PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes"
jamie@131 246 dnl PD_LDFLAGS="$PD_LDFLAGS -dynamiclib -mmacosx-version-min=10.5 -undefined dynamic_lookup -single_module"
jamie@131 247 dnl PD_SUFFIX=pd_darwin
jamie@131 248 dnl ;;
jamie@128 249 *-*-darwin*)
jamie@128 250 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes"
jamie@131 251 PD_LDFLAGS="$PD_LDFLAGS -bundle -undefined dynamic_lookup -flat_namespace"
jamie@128 252 PD_SUFFIX=pd_darwin
jamie@128 253 ;;
jamie@128 254
jamie@128 255 *)
jamie@128 256 dnl assume unix
jamie@128 257 PD_CFLAGS="$PD_CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1"
jamie@128 258 PD_LDFLAGS="$PD_LDFLAGS -shared"
jamie@128 259 PD_SUFFIX=pd_linux
jamie@128 260 ;;
jamie@128 261 esac
jamie@128 262 fi
jamie@128 263
jamie@128 264 PD_CFLAGS="$PD_CFLAGS -DPD"
jamie@128 265
jamie@128 266 AC_SUBST(PD_CFLAGS)
jamie@128 267 AC_SUBST(PD_LDFLAGS)
jamie@128 268 AC_SUBST(PD_SUFFIX)
jamie@128 269 AC_SUBST(PD_SOURCES)
jamie@128 270
jamie@145 271 AC_CONFIG_FILES([libxtract.pc])
jamie@128 272
jamie@128 273 dnl There must be a better way to do this...
jamie@145 274 AC_OUTPUT(Makefile src/Makefile doc/Makefile xtract/Makefile examples/Makefile examples/puredata/Makefile examples/simpletest/Makefile swig/Makefile swig/python/Makefile swig/java/Makefile)
jamie@128 275
jamie@128 276 echo
jamie@128 277 echo "**************************************************************"
jamie@128 278 echo
jamie@128 279 echo "Summary:"
jamie@128 280 echo
jamie@128 281 dnl echo you are using the ${host} architecture
jamie@128 282
jamie@145 283
jamie@145 284 if test -z "$DOXYGEN"; then
jamie@145 285 echo "doxygen documentation: no (doxygen not found)"
jamie@145 286 else
jamie@145 287 echo "doxygen documentation: yes"
jamie@145 288 fi
jamie@128 289 if test "$simpletest" = "true"; then
jamie@147 290 echo "simpletest example: yes"
jamie@128 291 else
jamie@145 292 echo "simpletest example: no"
jamie@128 293 fi
jamie@128 294 if test "$pd_example" = "true"; then
jamie@145 295 echo "PD external: yes"
jamie@145 296 echo
jamie@145 297 echo "The PD help files will be installed in:"
jamie@145 298 echo ${prefix}"/lib/doc/5.reference/xtract/"
jamie@145 299 echo "You must make sure that this is in your PD help path"
jamie@128 300 else
jamie@145 301 echo "PD external: no"
jamie@128 302 fi
jamie@128 303 if test "$swig" == "true"; then
jamie@145 304 echo "SWIG bindings: yes"
jamie@128 305 else
jamie@145 306 echo "SWIG bindings: no"
jamie@128 307 fi
jamie@128 308 if test "$with_java" == "true"; then
jamie@145 309 echo "with JAVA module: yes"
jamie@128 310 else
jamie@145 311 echo "with JAVA module: no"
jamie@128 312 fi
jamie@145 313 if test "$with_python" == "true"; then
jamie@145 314 echo "with Python module: yes"
jamie@145 315 else
jamie@145 316 echo "with Python module: no"
jamie@145 317 fi
jamie@145 318
jamie@145 319
jamie@128 320 echo
jamie@128 321 echo "**************************************************************"
jamie@128 322 echo
jamie@128 323 echo Configuration completed successfully. Type \'make\' to build ${PACKAGE}
jamie@128 324 echo
jamie@128 325
jamie@128 326