############################################################################### # # FILE: configure.in # DESCRIPTION: SXML: Configuration script # DATE: Fri, Jun 27 2003 # UPDATED: Wed, Aug 29 2007 # AUTHOR: Kouichi ABE (WALL) # E-MAIL: kouichi@MysticWALL.COM # URL: http://www.MysticWALL.COM/ # COPYRIGHT: (c) 2003-2007 Kouichi ABE (WALL), All rights reserved. # $Id: configure.in,v 1.11 2007/08/28 20:37:13 kouichi Exp $ # ############################################################################### # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([SXML], [1.0.4], [kouichi@MysticWALL.COM]) AC_CONFIG_SRCDIR([sxml.h]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_MAKE_SET AC_SUBST(RM) AC_PATH_PROGS([RM], [rm]) AC_SUBST(LD) AC_PATH_PROGS([LD], [ld]) AC_SUBST(AR) AC_PATH_PROGS([AR], [ar]) AC_SUBST(MAKE) AC_PATH_PROGS([MAKE], [make gmake]) AC_SUBST(MKDIR) AC_PATH_PROGS([MKDIR], [mkdir]) AC_SUBST(CTAGS) AC_PATH_PROGS([CTAGS], [exctags ctags]) AC_SUBST(EDITOR) AC_PATH_PROGS([EDITOR], [vim nvi elvis jvim vi]) # Checks for libraries. # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDBOOL AC_HEADER_STDC AC_HEADER_TIME AC_STRUCT_TM AC_CHECK_HEADERS([fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/time.h termios.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_INT32_T AC_TYPE_MODE_T AC_TYPE_UID_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_WORDS_BIGENDIAN # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_MALLOC AC_FUNC_MMAP AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_FUNC_STRTOD AC_CHECK_FUNCS([gettimeofday memset munmap select socket strcasecmp strchr strdup strerror strpbrk strtol]) dnl debug option AC_MSG_CHECKING([if --enable-debug option specified]) AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [build debugable code (for only developers)]), [ac_cv_debug="yes"], [ac_cv_debug="no"]) AC_MSG_RESULT([$ac_cv_debug]) if test "x$ac_cv_debug" = "xyes"; then if test "x$GCC" = "xyes"; then # CFLAGS="-O -g -DDEBUG -Wall -Wconversion -Wpointer-arith -Wstrict-prototypes" CFLAGS="-O -g -Wall -Wconversion -Wextra -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wswitch-enum -Wformat=2 -Wstrict-aliasing=2 -D_FORTIFY_SOURCE=2 -DDEBUG" else CFLAGS="-g -DDEBUG" fi else if test "x$GCC" = "xyes"; then CFLAGS="-O2" else CFLAGS="-O" fi fi AC_CONFIG_FILES([Makefile examples/Makefile]) AC_OUTPUT