Updates. Bump version to 0.2.0.
[cboard.git] / libchess / configure.ac
bloba4626a246dc932a90505901bb1e5c886acc05dd8
1 dnl $Id: configure.ac,v 1.18 2003-02-07 19:27:39 bjk Exp $
2 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.59)
4 AC_INIT(libchess, 0.2, [Ben Kibbey bjk@luxsci.net])
5 AC_CONFIG_AUX_DIR(build)
6 AC_CANONICAL_TARGET
7 AM_INIT_AUTOMAKE([foreign])
8 AC_PROG_MAKE_SET
9 AC_DISABLE_SHARED
10 AC_PROG_LIBTOOL
11 AC_CONFIG_SRCDIR([pgn.c])
12 AM_CONFIG_HEADER([config.h])
14 case "$target_os" in
15     darwin*)
16         LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
17         CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
18         ;;
19     *)
20         ;;
21 esac
23 CFLAGS="$CFLAGS -D_GNU_SOURCE"
25 dnl Checks for programs.
26 AC_PROG_CC
28 dnl Checks for header files.
29 AC_HEADER_STDC
30 AC_HEADER_SYS_WAIT
31 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h])
33 dnl Checks for typedefs, structures, and compiler characteristics.
34 AC_C_CONST
35 AC_TYPE_SIZE_T
36 AC_STRUCT_TM
38 dnl Checks for library functions.
39 AC_FUNC_MALLOC
40 AC_FUNC_REALLOC
41 AC_FUNC_STRFTIME
42 AC_CHECK_FUNCS([bzero isascii memset strcasecmp strdup])
44 AC_DEFUN([AC_DEBUG],
46     if test "$1"; then
47         ac_cv_sys_debug=$1
48     fi
50     AC_CACHE_CHECK([if debugging is wanted], [ac_cv_sys_debug],
51         [ac_cv_sys_debug=no])
53     if test "$ac_cv_sys_debug" = "yes"; then
54         CPPFLAGS="$CPPFLAGS -DDEBUG"
55     fi
58 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging.]),
59     AC_DEBUG([$enableval]), AC_DEBUG)
61 AM_WITH_DMALLOC
63 AC_CONFIG_FILES([Makefile])
64 AC_OUTPUT