summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in58
1 files changed, 58 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..4411b55
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,58 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(rep, 2.3.1b, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(rep, 2.3.1b)
+
+LDFLAGS="$LDFLAGS -L/usr/local/lib"
+
+AC_CONFIG_SRCDIR([src/rep.c])
+AM_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_AWK
+
+# The maximum buffer size
+AC_ARG_ENABLE(BUF,
+ AC_HELP_STRING([--max-buf=SIZE],
+ [maximum match buffer size (default 15 MB)]),
+ ac_max_buff=$enableval,
+ ac_max_buff=15728640)
+
+AC_DEFINE_UNQUOTED(MAX_BUFF, $ac_max_buff, [The maximum match buffer size])
+
+# Check for libraries
+AC_CHECK_LIB(pcre, pcre_compile, ,
+ [echo "ERROR: Must install PCRE libraries."; exit 1])
+
+# Checks for header files.
+AC_FUNC_ALLOCA
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h stdarg.h], ,
+ [echo "ERROR: Required header missing"; exit 1])
+AC_CHECK_HEADERS([unistd.h err.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_CHECK_TYPES([bool, byte, uint])
+
+# Checks for library functions.
+AC_FUNC_FNMATCH
+AC_FUNC_MALLOC
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+
+# Required Functions
+AC_CHECK_FUNCS([bzero chdir getcwd memmove memset strchr strcspn strerror strrchr strspn malloc realloc stat], ,
+ [echo "ERROR: Required function missing"; exit 1])
+AC_CHECK_FUNCS([strcasestr strlcpy strncpy strcpy strlcat strncat strcat strdup strndup stricmp strnicmp strcasecmp strncasecmp])
+AC_CHECK_FUNCS([getopt vasprintf vsnprintf reallocf])
+
+AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile common/Makefile doc/Makefile
+ win32/Makefile win32/common/Makefile win32/droplet/Makefile win32/makedrop/Makefile])
+AC_OUTPUT