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
|
dnl this file has to be processed by autoconf
AC_PREREQ(2.59)
MAJOR_VERSION=0
MINOR_VERSION=0
BUGFIX_VERSION=1
EXTRA_VERSION="-dev"
LIBSPHINXCLIENT_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUGFIX_VERSION}${EXTRA_VERSION}"
AC_INIT([libsphinxclient],[0.0.1])
AC_CONFIG_SRCDIR([README])
AC_CONFIG_SRCDIR(sphinxclient.h)
AC_CONFIG_HEADERS(sphinxclient_config.h)
AM_INIT_AUTOMAKE([no-define])
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_LD
m4_undefine([AC_PROG_CXX])
m4_defun([AC_PROG_CXX],[])
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
dnl Checks for header files.
AC_CHECK_HEADERS(string.h strings.h unistd.h stdint.h)
AC_CHECK_LIB([nsl], gethostbyname)
AC_CHECK_LIB([socket], connect)
DEFAULT_INSTALL_PREFIX="/usr/local"
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[enable debugging symbols and compile flags])
],
[
if test x"$enableval" = xyes ; then
debug="yes"
else
debug="no"
fi
]
)
if test x"$debug" = xyes ; then
AC_DEFINE([SPHINXCLIENT_DEBUG], [], [debug build])
if test x"$GCC" = xyes; then
dnl Remove any optimization flags from CFLAGS
changequote({,})
CFLAGS=`echo "$CFLAGS" | /usr/bin/sed -e 's/-O[0-9s]*//g'`
CFLAGS=`echo "$CFLAGS" | /usr/bin/sed -e 's/-g[0-2]\? //g'`
changequote([,])
CFLAGS="$CFLAGS -g3 -Wall -O0"
fi
dnl Do not strip symbols from developer object files.
INSTALL_STRIP_FLAG=""
else
dnl Make sure to strip symbols from non-developer object files.
INSTALL_STRIP_FLAG="-s"
fi
AC_SUBST(INSTALL_STRIP_FLAG)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|