| 1 |
# Process this file with autoconf to produce a configure script.
|
| 2 |
# $Id$
|
| 3 |
AC_INIT(Src/version.h)
|
| 4 |
AC_CONFIG_AUX_DIR(etc)
|
| 5 |
AM_INIT_AUTOMAKE(mixmaster, [3.08+cvs], mixmaster-devel@lists.sourceforge.net)
|
| 6 |
AM_CONFIG_HEADER([config.h])
|
| 7 |
|
| 8 |
dnl Find system type
|
| 9 |
AC_CANONICAL_HOST
|
| 10 |
|
| 11 |
dnl Remove trailing slash in $prefix
|
| 12 |
case "${prefix}" in
|
| 13 |
*/)
|
| 14 |
prefix=`echo ${prefix} | sed -e 's/^\(.*\)\/$/\1/'`
|
| 15 |
;;
|
| 16 |
esac
|
| 17 |
|
| 18 |
# Checks for programs.
|
| 19 |
AC_PROG_CC
|
| 20 |
AC_PROG_INSTALL
|
| 21 |
AC_PROG_LN_S
|
| 22 |
AC_PROG_MAKE_SET
|
| 23 |
AC_PROG_RANLIB
|
| 24 |
AC_PROG_CPP
|
| 25 |
AC_PROG_YACC
|
| 26 |
|
| 27 |
# These are all Windows libraries -- autoscan said we'd need them, but
|
| 28 |
# I have no Windows machine to test these on, so this undoubtedly is
|
| 29 |
# broken. I will leave it up to a windows geek to figure this out.
|
| 30 |
dnl AC_CHECK_LIB([gdi32], [main])
|
| 31 |
dnl AC_CHECK_LIB([user32], [main])
|
| 32 |
dnl AC_CHECK_LIB([wsock32], [main])
|
| 33 |
|
| 34 |
|
| 35 |
# Checks for header files.
|
| 36 |
AC_HEADER_DIRENT
|
| 37 |
AC_HEADER_STDC
|
| 38 |
AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h limits.h malloc.h memory.h \
|
| 39 |
netdb.h netinet/in.h stddef.h stdlib.h string.h sys/file.h \
|
| 40 |
sys/socket.h sys/time.h termios.h unistd.h utime.h])
|
| 41 |
|
| 42 |
# Checks for typedefs, structures, and compiler characteristics.
|
| 43 |
AC_C_CONST
|
| 44 |
AC_C_INLINE
|
| 45 |
AC_TYPE_OFF_T
|
| 46 |
AC_TYPE_SIZE_T
|
| 47 |
AC_HEADER_TIME
|
| 48 |
AC_STRUCT_TM
|
| 49 |
|
| 50 |
# Checks for library functions.
|
| 51 |
AC_FUNC_MEMCMP
|
| 52 |
AC_FUNC_MMAP
|
| 53 |
AC_FUNC_SETVBUF_REVERSED
|
| 54 |
AC_FUNC_STRFTIME
|
| 55 |
AC_FUNC_UTIME_NULL
|
| 56 |
AC_FUNC_VPRINTF
|
| 57 |
AC_CHECK_FUNCS([stat mktime fork atexit dup2 ftruncate getcwd gethostbyaddr \
|
| 58 |
gethostbyname gethostname gettimeofday memmove memset mkdir \
|
| 59 |
munmap socket strchr strdup strerror strrchr strstr strtol \
|
| 60 |
uname utime setenv getdomainname])
|
| 61 |
|
| 62 |
# ncurses?
|
| 63 |
AH_TEMPLATE(
|
| 64 |
[USE_NCURSES],
|
| 65 |
[Define to 1 if you want ncurses support and have the ncurses library.]
|
| 66 |
)
|
| 67 |
AC_CHECK_LIB([ncurses], [getstr],
|
| 68 |
[ LIBS="-lncurses ${LIBS}"
|
| 69 |
AC_DEFINE(USE_NCURSES) ])
|
| 70 |
AC_CHECK_HEADERS(ncurses.h)
|
| 71 |
|
| 72 |
# Zlib check. If the system version is older than 1.1.4, we want to
|
| 73 |
# use the included version. 1.1.4 fixed that nasty double-free bug.
|
| 74 |
dnl AM_ZLIB_CHECK
|
| 75 |
AH_TEMPLATE(
|
| 76 |
[USE_ZLIB],
|
| 77 |
[Define to 1 if you have ZLib.]
|
| 78 |
)
|
| 79 |
AC_CHECK_LIB([z], [gzopen],
|
| 80 |
[ LIBS="-lz ${LIBS}"
|
| 81 |
AC_DEFINE(USE_ZLIB) ],
|
| 82 |
[ AC_MSG_ERROR([could not find a working zlib]) ]
|
| 83 |
)
|
| 84 |
|
| 85 |
# If PCRE isn't installed on the system, we luckily have included a
|
| 86 |
# version.
|
| 87 |
AH_TEMPLATE(
|
| 88 |
[USE_PCRE],
|
| 89 |
[Define to 1 if you have libpcre installed.]
|
| 90 |
)
|
| 91 |
AC_CHECK_LIB([pcre], [pcre_compile],
|
| 92 |
[ LIBS="-lpcre ${LIBS}"
|
| 93 |
AC_DEFINE(USE_PCRE) ],
|
| 94 |
[ AC_MSG_ERROR([could not find a working libpcre]) ]
|
| 95 |
)
|
| 96 |
|
| 97 |
for dir in /usr/include /usr/local/include
|
| 98 |
do
|
| 99 |
if test -d "$dir/pcre"
|
| 100 |
then
|
| 101 |
CPPFLAGS="-I$dir/pcre ${CPPFLAGS}"
|
| 102 |
break
|
| 103 |
fi
|
| 104 |
done
|
| 105 |
AC_CHECK_HEADER(pcre.h)
|
| 106 |
|
| 107 |
AM_OPENSSL_CHECK
|
| 108 |
AM_OPENSSL_RSA
|
| 109 |
AM_OPENSSL_IDEA
|
| 110 |
AM_OPENSSL_AES
|
| 111 |
|
| 112 |
# This is always defined, as near as I can tell.
|
| 113 |
AH_TEMPLATE([USE_PGP],
|
| 114 |
[Define to support the OpenPGP message format.])
|
| 115 |
AC_DEFINE(USE_PGP)
|
| 116 |
|
| 117 |
# Did we set a passphrase, against our better judgement?
|
| 118 |
AM_PASSPHRASE
|
| 119 |
|
| 120 |
# Where should Mixmaster work its lovely magic? Apparently this has a
|
| 121 |
# sane default now?
|
| 122 |
AM_MIXMASTER_DIR
|
| 123 |
AM_MIXMASTER_SPOOL
|
| 124 |
AM_MIXMASTER_HOME
|
| 125 |
AM_MIXMASTER_CONF
|
| 126 |
|
| 127 |
# Contains additional build information (such as pcre and zlib)
|
| 128 |
AC_SUBST(TOPDIRS)
|
| 129 |
AC_SUBST(XLIBS)
|
| 130 |
AC_SUBST(XDEFS)
|
| 131 |
|
| 132 |
AC_OUTPUT([Src/Makefile Makefile], [ echo timestamp > stamp-h ])
|