1dnl Process this file with autoconf to produce a configure script. 2AC_INIT(src/lesson.c) 3AC_PREREQ(2.50) 4AC_CANONICAL_SYSTEM 5 6dnl library version 7dnl changed or added interfaces: CURRENT++ and AGE++ and REVISION = 0 8dnl binary compatibility broken: CURRENT++, REVISION and AGE = 0 9dnl interfaces stay the same as before: REVISION++ 10CURRENT=3 11REVISION=0 12AGE=1 13 14dnl public version 15VERSION=0.2.1 16 17AC_SUBST(CURRENT) 18AC_SUBST(REVISION) 19AC_SUBST(AGE) 20AC_SUBST(VERSION) 21 22dnl automake 23AM_INIT_AUTOMAKE(liblingoteach,$VERSION) 24AM_CONFIG_HEADER(config.h) 25AM_MAINTAINER_MODE 26 27dnl Checks for programs. 28AC_PROG_CC 29AC_PROG_INSTALL 30AC_PROG_LIBTOOL 31 32dnl Checks for header files. 33AC_HEADER_STDC 34AC_CHECK_HEADERS(unistd.h sys/stat.h sys/param.h sys/wait.h sys/types.h) 35 36dnl Checks for typedefs, structures, and compiler characteristics. 37AC_C_CONST 38 39dnl Checks for library functions. 40AC_FUNC_MALLOC 41AC_FUNC_MEMCMP 42AC_CHECK_FUNCS(getcwd memset mkdir setlocale strchr strstr printf sprintf) 43AC_CHECK_FUNCS(chdir strcpy strncpy strcmp strncmp fork waitpid execlp) 44 45dnl other stuff, which should be checked for 46AC_ISC_POSIX 47 48dnl xml stuff 49AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 50if test "$PKG_CONFIG" = "no"; then 51 echo "*** The pkg-config script could not be found. Make sure it is" 52 echo "*** in your path or set the PKG_CONFIG enviroment variable to" 53 echo "*** full path to pkg-config." 54 AC_MSG_ERROR([pkg-config could not found.]) 55fi 56PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.5.5) 57AC_SUBST(XML_CFLAGS) 58AC_SUBST(XML_LIBS) 59 60dnl arguments for debugging 61AC_ARG_ENABLE([debug],AC_HELP_STRING([--enable-debug], 62 [enable additional debugging messages for 63 lingoteach [[default=no]]]),, 64enable_debug=no) 65if test "$enable_debug" = "yes"; then 66 AC_MSG_RESULT([Enabling additional debugging features...]) 67 AC_DEFINE(DEBUG,1,[additional debugging features]) 68fi 69DFLAGS="-W -Wall -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith \ 70 -ansi -Wconversion -Wstrict-prototypes -Wredundant-decls -Winline" 71AC_SUBST(DFLAGS) 72 73dnl arguments for zlib compression support 74AC_ARG_ENABLE([compression],AC_HELP_STRING([--enable-compression], 75 [enable zlib compression for user data 76 [[default=no]]]),, 77with_comp=no) 78if test "$enable_compression" = "yes"; then 79 AC_MSG_RESULT([Enabling zlib compression....]) 80 AC_DEFINE(WITH_COMP,1,[zlib compression for user data]) 81fi 82 83dnl output 84AC_OUTPUT([Makefile 85 src/Makefile 86 test/Makefile 87 doc/Makefile 88 liblingoteach.pc]) 89