configure.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:1k
- dnl Process this file with autoconf to produce a configure script.
- dnl $Id: configure.in,v 1.9 2000/05/24 03:51:29 mrsam Exp $
- dnl
- dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- dnl distribution information.
- AC_INIT(gdbmobj.c)
- AM_INIT_AUTOMAKE(gdbmobj, 0.10, 0)
- AM_CONFIG_HEADER(config.h)
- dnl Checks for programs.
- AC_PROG_AWK
- AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_RANLIB
- AC_ISC_POSIX
- AC_AIX
- AC_MINIX
- dnl Checks for libraries.
- saveLIBS="$LIBS"
- AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ])
- AC_CHECK_FUNC(gdbm_open, FOUND_GDBM=1, FOUND_GDBM=0)
- if test "$FOUND_GDBM" = 1
- then
- AC_CHECK_FUNCS(gdbm_fdesc)
- fi
- AC_CHECK_HEADERS(unistd.h fcntl.h)
- LIBS="$saveLIBS"
- AC_SUBST(LIBGDBM)
- AM_CONDITIONAL(FOUND_GDBM, test "$FOUND_GDBM" = 1)
- dnl Checks for header files.
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_TYPE_SIZE_T
- dnl Checks for library functions.
- AC_LANG_CPLUSPLUS
- AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions],
- ac_cxx_need_handlexceptions,
- AC_TRY_COMPILE([],
- [
- throw;
- ], ac_cxx_need_handlexceptions=no,
- ac_cxx_need_handlexceptions=yes)
- )
- if test "$ac_cxx_need_handlexceptions" = "yes"
- then
- case "$CXXFLAGS" in
- *handle-exceptions*)
- ;;
- *)
- CXXFLAGS="-fhandle-exceptions $CXXFLAGS"
- CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'`
- ;;
- esac
- fi
- AC_OUTPUT(Makefile)