📄 aclocal.m4.svn-base
字号:
# aclocal.m4 generated automatically by aclocal 1.5# Copyright 1996, 1997, 1998, 1999, 2000, 2001# Free Software Foundation, Inc.# This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY, to the extent permitted by law; without# even the implied warranty of MERCHANTABILITY or FITNESS FOR A# PARTICULAR PURPOSE.dnl This file is part of libodbc++.dnl dnl Copyright (C) 1999-2000 Manush Dodunekov <manush@stendahls.net>dnl dnl This library is free software; you can redistribute it and/ordnl modify it under the terms of the GNU Library General Publicdnl License as published by the Free Software Foundation; eitherdnl version 2 of the License, or (at your option) any later version.dnl dnl This library is distributed in the hope that it will be useful,dnl but WITHOUT ANY WARRANTY; without even the implied warranty ofdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUdnl Library General Public License for more details.dnl dnl You should have received a copy of the GNU Library General Public Licensednl along with this library; see the file COPYING. If not, write todnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,dnl Boston, MA 02111-1307, USA.dnl Local macros for libodbc++dnl Macro: AC_CHECK_CXX_STLdnl Sets $ac_cv_cxx_stl to yes or nodnl defines HAVE_CXX_STL if okAC_DEFUN(AC_CHECK_CXX_STL,[AC_LANG_SAVEAC_LANG_CPLUSPLUSAC_MSG_CHECKING([whether STL is available])AC_CACHE_VAL(ac_cv_cxx_stl,[AC_TRY_COMPILE([#include <set>],[std::set<int> t;t.insert(t.begin(),1);std::set<int>::iterator i=t.find(1);],ac_cv_cxx_stl=yes,ac_cv_cxx_stl=no)])AC_MSG_RESULT($ac_cv_cxx_stl)if test "x$ac_cv_cxx_stl" = "xyes"then AC_DEFINE(HAVE_CXX_STL, 1,Defined if you have stl)fiAC_LANG_RESTORE])dnl Macro: AC_CHECK_CXX_EHdnl Sets $ac_cv_cxx_eh to yes or noAC_DEFUN(AC_CHECK_CXX_EH,[AC_LANG_SAVEAC_LANG_CPLUSPLUSAC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS) has correct exception handling])AC_CACHE_VAL(ac_cv_cxx_eh,[AC_TRY_RUN([#include <exception>#include <string.h>using namespace std;struct test : public exception { virtual const char* what() const throw() { return "test"; }};static void func() { throw test(); }int main(void){ try { func(); } catch(exception& e) { return (strcmp(e.what(),"test")!=0); } catch(...) { return 1; } return 1;}],ac_cv_cxx_eh=yes,ac_cv_cxx_eh=no)])AC_MSG_RESULT([$ac_cv_cxx_eh])if test "x$ac_cv_cxx_eh" = "xyes"then AC_DEFINE(HAVE_CXX_EH, 1,Defined if we have exception handling)fiAC_LANG_RESTORE])dnl Macro: AC_CHECK_CXX_NSdnl Test if the c++ compiler supports namespacesdnl Set $ac_cv_cxx_ns to either yes or nodnl Define HAVE_CXX_NS if yesAC_DEFUN(AC_CHECK_CXX_NS,[AC_LANG_SAVEAC_LANG_CPLUSPLUSAC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS) supports namespaces])AC_CACHE_VAL(ac_cv_cxx_ns,[AC_TRY_COMPILE([namespace A { namespace B { struct X {}; };};],[ A::B::X x;],ac_cv_cxx_ns=yes,ac_cv_cxx_ns=no)])AC_MSG_RESULT([$ac_cv_cxx_ns])if test "x$ac_cv_cxx_ns" = "xyes"then AC_DEFINE(HAVE_CXX_NS, 1,Defined if we have namespaces)fiAC_LANG_RESTORE])dnl Macro: AC_CHECK_THREADSdnl Test if we should compile with thread supportAC_DEFUN(AC_CHECK_THREADS,[AC_MSG_CHECKING([whether to enable threads])AC_ARG_ENABLE(threads,[ --enable-threads Enable threads], enable_threads=yes)if test "x$enable_threads" = "xyes" then AC_MSG_RESULT(yes)# ok, now check for pthreadsAC_CHECK_HEADER(pthread.h,[ AC_DEFINE(HAVE_PTHREAD_H, 1,Defined if pthreads are available ) ],[AC_MSG_ERROR([pthread.h not found. Consider not using --enable-threads])])# check if pthreads are in our default library environmentAC_CHECK_FUNCS(pthread_create,pthreads_ok=yes,pthreads_ok=no)THREAD_LIBS=""if test "x$pthreads_ok" != xyesthenAC_CHECK_LIB(pthread,pthread_create, pthreads_ok=yes THREAD_LIBS="-lpthread",pthreads_ok=no)fiif test "x$pthreads_ok" != xyesthen# hpux 11 uses macros for pthread_create so test another functionAC_CHECK_LIB(pthread,pthread_join, pthreads_ok=yes THREAD_LIBS="-lpthread",pthreads_ok=no)fiif test "x$pthreads_ok" != xyesthen# try libc_r (*BSD) AC_CHECK_LIB(c_r,pthread_create, pthreads_ok=yes THREAD_LIBS="-lc_r",pthreads_ok=no)fiif test "x$pthreads_ok" = xyesthen# now we know we can use pthreads AC_DEFINE(ENABLE_THREADS,1,Defined if threads enabled) CXXFLAGS="-D_REENTRANT $CXXFLAGS" CFLAGS="-D_REENTRANT $CFLAGS"else AC_MSG_ERROR([Unable to find a POSIX threads environment.])fielse AC_MSG_RESULT(no)fiAC_SUBST(THREAD_LIBS)])dnl Macro: AC_CHECK_IODBCdnl Checks for iodbc optionally in provided directoriesdnl sets shell variable iodbc_ok to yes or no.dnl Defines HAVE_LIBIODBC, HAVE_ISQL_H, HAVE_ISQLEXT_H if they are foundAC_DEFUN(AC_CHECK_IODBC,[AC_LANG_SAVEAC_LANG_CAC_ARG_WITH(iodbc,[ --with-iodbc[=DIR] Use iodbc, optionally installed in DIR],[if test "x$withval" != "xyes"then iodbc_dir=$withvalelse iodbc_dir="/usr/local"fi])if test "x$iodbc_dir" = "x"then iodbc_dir="/usr/local"fiAC_ARG_WITH(iodbc-includes,[ --with-iodbc-includes=DIR Find iodbc headers in DIR],[iodbc_includes_dir=$withval],[iodbc_includes_dir="$iodbc_dir/include"])AC_ARG_WITH(iodbc-libraries,[ --with-iodbc-libraries=DIR Find iodbc libraries in DIR],[iodbc_libraries_dir=$withval],[iodbc_libraries_dir="$iodbc_dir/lib"])save_CPPFLAGS="$CPPFLAGS"save_LIBS="$LIBS"CPPFLAGS="$CPPFLAGS -I$iodbc_includes_dir"LIBS="$LIBS -L$iodbc_libraries_dir"AC_CHECK_HEADERS([isql.h isqlext.h],[iodbc_ok=yes; odbc_headers="$odbc_headers $ac_hdr"],[iodbc_ok=no; break])if test "x$iodbc_ok" = "xyes"then AC_CHECK_LIB(iodbc,SQLConnect,[iodbc_ok=yes],[iodbc_ok=no])fiif test "x$iodbc_ok" = "xyes"then LIBS="$LIBS -liodbc" AC_DEFINE(HAVE_LIBIODBC,1,Defined if using iodbc) AC_DEFINE(HAVE_ISQL_H,1,Defined if using iodbc) AC_DEFINE(HAVE_ISQLEXT_H,1,Defined if using iodbc)else CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS"fiAC_LANG_RESTORE])dnl Macro: AC_CHECK_ODBC_TYPEdnl Checks if $1 is a valid type in the ODBC environment,dnl and #defines it to $2 if notAC_DEFUN(AC_CHECK_ODBC_TYPE,[AC_MSG_CHECKING([for $1])AC_CACHE_VAL(ac_cv_odbc_$1,[AC_LANG_SAVEAC_LANG_Cecho > conftest.cfor i in $odbc_headersdo echo "#include <$i>" >> conftest.cdoneecho "int main(void) { $1 x; return 0; }" >> conftest.cif $CC -c $CFLAGS $CPPFLAGS conftest.c > /dev/null 2> /dev/nullthen eval ac_cv_odbc_$1=yeselse eval ac_cv_odbc_$2=nofirm -f conftest*AC_LANG_RESTORE])eval ac_odbc_check_res=$ac_cv_odbc_$1if test "x$ac_odbc_check_res" = "xyes"then AC_MSG_RESULT(yes)else AC_MSG_RESULT([no ($2)]) AC_DEFINE($1,$2, No description)fi])# Do all the work for Automake. This macro actually does too much --# some checks are only needed if your package does certain things.# But this isn't really a big deal.# serial 5# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be# written in clear, in which case automake, when reading aclocal.m4,# will think it sees a *use*, and therefore will trigger all it's# C support machinery. Also note that it means that autoscan, seeing# CC etc. in the Makefile, will ask for an AC_PROG_CC use...# We require 2.13 because we rely on SHELL being computed by configure.AC_PREREQ([2.13])# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)# -----------------------------------------------------------# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.# The purpose of this macro is to provide the user with a means to# check macros which are provided without letting her know how the# information is coded.# If this macro is not defined by Autoconf, define it here.ifdef([AC_PROVIDE_IFELSE], [], [define([AC_PROVIDE_IFELSE], [ifdef([AC_PROVIDE_$1], [$2], [$3])])])# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])# ----------------------------------------------AC_DEFUN([AM_INIT_AUTOMAKE],[AC_REQUIRE([AC_PROG_INSTALL])dnl# test to see if srcdir already configuredif test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])fi# Define the identity of the package.PACKAGE=$1AC_SUBST(PACKAGE)dnlVERSION=$2AC_SUBST(VERSION)dnlifelse([$3],,[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow# the ones we care about.ifdef([m4_pattern_allow], [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl# Autoconf 2.50 always computes EXEEXT. However we need to be# compatible with 2.13, for now. So we always define EXEEXT, but we# don't compute it.AC_SUBST(EXEEXT)# Similar for OBJEXT -- only we only use OBJEXT if the user actually# requests that it be used. This is a bit dumb.: ${OBJEXT=o}AC_SUBST(OBJEXT)# Some tools Automake needs.AC_REQUIRE([AM_SANITY_CHECK])dnlAC_REQUIRE([AC_ARG_PROGRAM])dnlAM_MISSING_PROG(ACLOCAL, aclocal)AM_MISSING_PROG(AUTOCONF, autoconf)AM_MISSING_PROG(AUTOMAKE, automake)AM_MISSING_PROG(AUTOHEADER, autoheader)AM_MISSING_PROG(MAKEINFO, makeinfo)AM_MISSING_PROG(AMTAR, tar)AM_PROG_INSTALL_SHAM_PROG_INSTALL_STRIP# We need awk for the "check" target. The system "awk" is bad on# some platforms.AC_REQUIRE([AC_PROG_AWK])dnlAC_REQUIRE([AC_PROG_MAKE_SET])dnlAC_REQUIRE([AM_DEP_TRACK])dnlAC_REQUIRE([AM_SET_DEPDIR])dnlAC_PROVIDE_IFELSE([AC_PROG_][CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_][CC], defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnlAC_PROVIDE_IFELSE([AC_PROG_][CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_][CXX], defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl])## Check to make sure that the build environment is sane.## serial 3# AM_SANITY_CHECK# ---------------AC_DEFUN([AM_SANITY_CHECK],[AC_MSG_CHECKING([whether build environment is sane])# Just in casesleep 1echo timestamp > conftest.file# Do `set' in a subshell so we don't clobber the current shell's# arguments. Must try -L first in case configure is actually a# symlink; some systems play weird games with the mod time of symlinks# (eg FreeBSD returns the mod time of the symlink's containing# directory).if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -