Fixed showing the loading progress when in-game.
[cboard.git] / libchess / configure.ac
blob71810731c93a5dfdb0505be59d33301b164f406e
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT(libchess, 1.0-git, [Ben Kibbey bjk@luxsci.net])
4 AC_CONFIG_AUX_DIR(build)
5 AC_CANONICAL_TARGET
6 AM_INIT_AUTOMAKE([foreign])
7 AC_PROG_MAKE_SET
8 AC_DISABLE_SHARED
9 AC_PROG_LIBTOOL
10 AC_CONFIG_SRCDIR([pgn.c])
11 AM_CONFIG_HEADER([config.h])
13 case "$target_os" in
14     darwin*)
15         LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
16         CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
17         ;;
18     *)
19         ;;
20 esac
22 CFLAGS="$CFLAGS -D_GNU_SOURCE"
24 dnl Checks for programs.
25 AC_PROG_CC
27 dnl Checks for header files.
28 AC_HEADER_STDC
29 AC_HEADER_SYS_WAIT
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 \
32                  putw_unlocked])])
34 AM_CONDITIONAL([NO_ERR_H], [test "x$ac_cv_header_err_h" = "xno"])
36 dnl Checks for typedefs, structures, and compiler characteristics.
37 AC_C_CONST
38 AC_TYPE_SIZE_T
39 AC_STRUCT_TM
41 dnl Checks for library functions.
42 AC_FUNC_MALLOC
43 AC_FUNC_REALLOC
44 AC_FUNC_STRFTIME
45 AC_CHECK_FUNCS([bzero isascii memset strcasecmp strdup strsep getcwd])
47 AM_CONDITIONAL([NO_STRSEP], [test "x$ac_cv_func_strsep" = "xno"])
49 AC_DEFUN([AC_DEBUG],
51     if test "$1"; then
52         ac_cv_sys_debug=$1
53     fi
55     AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
56         [ac_cv_sys_debug=no])
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 AM_WITH_DMALLOC
65 AC_CONFIG_FILES([Makefile])
66 AC_OUTPUT