1
dnl Process this file with autoconf to produce a configure script.
5
dnl Some intro checks and defines
6
AC_INIT(AtomicParsley,AP_VER,pu@me.com)
7
AC_REVISION ($Id: configure.ac,v 1.14 2006/11/23 12:00:00 PU Exp $)
9
AC_CONFIG_SRCDIR(src/AtomicParsley.cpp)
10
AC_CONFIG_HEADER(src/config.h)
17
AP_VER=\"$AP_MAJOR_VERSION.$AP_MINOR_VERSION.$AP_MICRO_VERSION\"
18
AC_DEFINE_UNQUOTED(AP_VER,$AP_VER,[Define program version])
20
dnl---------------------------------------------------------
21
dnl Checks for programs.
25
dnl---------------------------------------------------------
26
dnl Checks for header files.
30
AC_CHECK_HEADERS([stdio.h string.h stdlib.h time.h math.h signal.h \
33
sys/types.h sys/stat.h errno.h \
36
AC_CHECK_HEADERS(getopt.h, [HAVE_GETOPT_H=1; AC_SUBST(HAVE_GETOPT_H)])
38
AC_CHECK_HEADERS(linux/cdrom.h)
40
dnl---------------------------------------------------------
41
dnl Checks for typedefs, structures, and compiler characteristics.
44
dnl---------------------------------------------------------
45
dnl Checks for library functions.
46
AC_CHECK_FUNCS([fseeko fsetpos memset memcmp remove rename sranddev sscanf strdup strerror strftime strncmp strncasecmp strrchr strsep strstr strtol wmemset])
48
AC_CHECK_FUNCS(lroundf)
50
dnl---------------------------------------------------------
51
dnl Checks for libraries.
52
AC_CHECK_LIB(z, deflateEnd, [HAVE_LIBZ=1; AC_SUBST(HAVE_LIBZ)])
54
dnl---------------------------------------------------------
60
AC_DEFINE_UNQUOTED(os_name, $AP_OS_NAME, [OS Platform name])
61
if test "$os_name" = "Darwin" ; then
62
HAVE_DARWIN_PLATFORM="true"
63
AC_SUBST(HAVE_DARWIN_PLATFORM)
66
dnl---------------------------------------------------------
67
dnl Mac OS X Universal Build
68
AC_ARG_ENABLE(universal, dnl
69
[ --disable-universal build a universal binary on Mac OS X [default=yes]],
70
universal=$enableval, universal=no)
71
if test "$universal" = "yes" ; then
72
AC_CHECK_DARWIN_UNIVERSAL_SDK
76
dnl---------------------------------------------------------
77
AC_ARG_ENABLE(debug, dnl
78
[ --disable-debug_build do not build a debug version [default=yes]],
79
debug=$enableval, debug=no)
80
if test "$debug" = "yes" ; then
81
AC_DEFINE_UNQUOTED(DEBUG, $debug, [build binary with debug output])
85
dnl---------------------------------------------------------
88
AC_OUTPUT([Makefile src/Makefile])
93
dnl Pretty-print status message
94
echo "+----------------------------------------------+"
96
echo "+----------------------------------------------+"
97
echo " AtomicParsley has been configured, you should"
98
echo " now type 'make' to compile AtomicParsley."
100
echo "+----------------------------------------------+"
101
echo "| YOUR CONFIGURATION |"
102
echo "+----------------------------------------------+"
104
echo " Version: $AP_MAJOR_VERSION.$AP_MINOR_VERSION.$AP_MICRO_VERSION"
106
if test "$universal" = "no" ; then
107
echo " MacOSX universal build: disabled"
109
echo " MacOSX universal build: enabled"
112
if test "$debug" = "no" ; then
113
echo " debug build: disabled"
115
echo " debug build: enabled"