1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(libchess, 1.0-git, [Ben Kibbey bjk@luxsci.net])
4 AC_CONFIG_AUX_DIR(build)
6 AM_INIT_AUTOMAKE([foreign])
10 AC_CONFIG_SRCDIR([pgn.c])
11 AM_CONFIG_HEADER([config.h])
15 LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
16 CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
22 CFLAGS="$CFLAGS -D_GNU_SOURCE"
24 dnl Checks for programs.
27 dnl Checks for header files.
30 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h])
31 AC_CHECK_HEADERS([err.h],, [AC_CHECK_FUNCS([fputs_unlocked putwc_unlocked \
34 AM_CONDITIONAL([NO_ERR_H], [test "x$ac_cv_header_err_h" = "xno"])
36 dnl Checks for typedefs, structures, and compiler characteristics.
41 dnl Checks for library functions.
45 AC_CHECK_FUNCS([bzero isascii memset strcasecmp strdup strsep getcwd])
47 AM_CONDITIONAL([NO_STRSEP], [test "x$ac_cv_func_strsep" = "xno"])
55 AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
57 AM_CONDITIONAL([WITH_DEBUG], [test "x$ac_cv_sys_debug" = "xyes"])
60 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging.]),
61 AC_DEBUG([$enableval]), AC_DEBUG)
63 AC_CONFIG_FILES([Makefile])