diff configure.in @ 59:7d5c637aaafb

General cleanup and code fixes. Use autoscan to cleanup our autoconf system. Use autoconf to detect when we need to use our XGetopt files and other header files. Decode BCC field. Fix missing LE32_CPU byte swapping for FILETIME types.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 14 Feb 2008 14:55:32 -0800
parents 034641c26ab9
children b4f025d95441
line wrap: on
line diff
--- a/configure.in	Wed Feb 06 23:05:56 2008 -0800
+++ b/configure.in	Thu Feb 14 14:55:32 2008 -0800
@@ -1,13 +1,46 @@
-AC_INIT(configure.in)
+AC_PREREQ(2.59)
+AC_INIT(libpst,0.6.6,carl@five-ten-sg.com)
+AC_CONFIG_SRCDIR([config.h.in])
+AC_CONFIG_HEADER([config.h])
+
+AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+AC_SYS_LARGEFILE
 
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libpst,0.6.6)
-AC_PATH_PROGS(BASH, bash)
+# Checks for header files.
+AC_CHECK_HEADER([unistd.h],
+    AM_CONDITIONAL(NEED_XGETOPT, [test yes = no ]),
+    AM_CONDITIONAL(NEED_XGETOPT, [test yes = yes])
+    )
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([limits.h malloc.h netinet/in.h stdint.h stdlib.h string.h sys/param.h wchar.h])
 
-AC_LANG_CPLUSPLUS
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_SYS_LARGEFILE
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_FUNC_LSTAT
+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+AC_FUNC_MALLOC
+AC_FUNC_MKTIME
+AC_FUNC_REALLOC
+AC_FUNC_STRFTIME
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([memchr memmove memset strcasecmp strchr strdup strerror strpbrk strrchr strstr strtol])
 
 # The following lines adds the --enable-pst-debug option to configure:
 #