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
|
# -*- autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([specimen], [0.4.5])
AC_CONFIG_SRCDIR([src/specimen.c])
AM_INIT_AUTOMAKE
# compilation
with_debug="no"
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug],
[enable debugging information, accepting a performance penalty (default is NO)])],
[if test x$enable_debug = xyes; then with_debug=yes ; fi])
if test x$with_debug = xno; then
CFLAGS="-O3"
else
AC_DEFINE(DEBUG, 1, [[whether to display debugging output or not]])
fi
# standard autoconf checks
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h])
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
AC_FUNC_MALLOC
AC_CHECK_FUNCS([floor gettimeofday pow strchr strdup])
# pthreads
ACX_PTHREAD
# pkg-config everything else
PKG_CHECK_MODULES(PKG, [gtk+-2.0 libxml-2.0 jack alsa samplerate sndfile phat])
# set compilation flags
PIXDIR="\\\"\$(pkgdatadir)/pixmaps/\\\""
PIXDIR_UNQUOTED="\$(pkgdatadir)/pixmaps/" # for pixmap/Makefile.am
AC_SUBST(PIXDIR)
AC_SUBST(PIXDIR_UNQUOTED)
CFLAGS="$CFLAGS $PKG_CFLAGS $PTHREAD_CFLAGS -DPIXMAPSDIR=@PIXDIR@ -Wall -Werror"
LIBS="$LIBS $PKG_LIBS $PTHREAD_LIBS"
CC="$PTHREAD_CC"
# print build summary
AC_CONFIG_COMMANDS_POST([
echo
echo
echo " BUILD SUMMARY"
echo " ============="
echo
echo -n " Build type: "
if test x$with_debug = xyes; then
echo "debugging"
else
echo "optimized"
fi
echo
echo
])
AC_CONFIG_FILES([Makefile pixmaps/Makefile src/Makefile src/gui/Makefile])
AM_CONFIG_HEADER([src/config.h])
AC_OUTPUT
|