📄 configure.ac
字号:
# Copyright (C) 1999-2002 Open Source Telecom Corporation.## This file is free software; as a special exception the author 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.AC_INIT(src/thread.cpp)VERSION="1.3.21"LT_RELEASE="1.3"LT_VERSION="1:17"dnl this is a C++ library after all..AC_LANG(C++)# use ~/.configure to hold default options when I use no options...cfg_options=""if test -z "$*" ; then if test -f ~/.configure ; then cfg_options=`grep ^commoncpp2: ~/.configure | sed -e s/^commoncpp2://` elif test -f /etc/configure.conf ; then cfg_options=`grep ^commoncpp2: /etc/configure.conf | sed -e s/^commoncpp2://` fifiif test ! -z "$cfg_options" ; then echo "using ~/.configure defaults...$cfg_options" case "$SHELL" in */bash*) exec $SHELL $0 $cfg_options exit -1 ;; esac exec $0 $cfg_options exit -1fi# lsb build optionccincludedir=""ost_cv_thread_library="none"COMMON_FLAGS="-D_GNU_SOURCE"AC_ARG_WITH(lsb, [ --with-lsb=name Build lsb compliant package], [if test ! -d "$prefix" ; then prefix="/opt/$withval" ; fi if test ! -d "$sysconfdir" ; then sysconfdir="/etc$prefix" ; fi if test ! -d "$localstatedir" ; then localstatedir="/var$prefix" ; fi AC_SUBST(prefix) CC=/opt/lsbdev-cc/bin/lsbcc AC_SUBST(CC) CXX=/opt/lsbdev-cc/bin/lsbc++ AC_SUBST(CXX) AC_SUBST(sysconfdir) AC_SUBST(localstatedir) ])case "$prefix" in/opt/*) if test "$datadir" == '${prefix}/share' ; then if test "$mandir" == '${datadir}/man' ; then mandir='${prefix}/man' ; fi if test "$infodir" == '${datadir}/info' ; then infodir='${prefix}/info' ; fi datadir='${prefix}' fi if test "$sysconfdir" == '${prefix}/etc' ; then sysconfdir=/etc${prefix} ; fi if test "$localstatedir" == '${prefix}/var' ; then localstatedir=/var${prefix} ; fi if test "$includedir" == '${prefix}/include' ; then ccincludedir="$includedir" ; fi AC_SUBST(mandir) AC_SUBST(infodir) AC_SUBST(sysconfdir) AC_SUBST(localstatedir) AC_SUBST(datadir) AC_SUBST(prefix) ;;esacif test -z "$ccincludedir" ; then case "$includedir" in */lib/*) ccincludedir='${includedir}' ;; *) ccincludedir='${includedir}/cc++2' ;; esacfiAC_SUBST(ccincludedir)AC_CONFIG_AUX_DIR(autoconf)AC_CANONICAL_SYSTEMAC_PROG_CPPAC_PROG_CCAC_PROG_CXXCPPAC_PROG_CXXOST_PROG_CC_POSIXNP_PROG_MSCAM_PROG_LIBTOOLAM_INIT_AUTOMAKE(commoncpp2, [$VERSION])AM_CONFIG_HEADER(include/config.h)AH_TOP(#ifndef CCXX_CONFIG_H_#define CCXX_CONFIG_H_#define __DLL#define __EXPORT#define __DLLRTL#define __MEMBER_EXPORT#undef CCXX_EMPTY#define CCXX_EMPTY#define CCXX_EXPORT(t) t#define CCXX_MEMBER(t) t#define CCXX_MEMBER_EXPORT(t) t#define CCXX_CLASS_EXPORT#define COMMON_64_CLEAN#define COMMON_ASYNC_OVERRIDE#define COMMON_OST_NAMESPACE#define COMMON_THREAD_SLEEP#define COMMON_NET_DEVICES#define COMMON_THREAD_DEBUG#define COMMON_DEADLOCK_DEBUG#define COMMON_NAMED_MUTEX#define COMMON_PROCESS_ATTACH#define COMMON_XML_PARSING#if __GNUC__ > 1 && !defined(__STRICT_ANSI__) && !defined(__PEDANTIC__)#define DYNAMIC_LOCAL_ARRAYS#endif#if defined(__CYGWIN__)#define _POSIX_REALTIME_SIGNALS#define _POSIX_THREADS#endif#if defined(__APPLE__) && defined(__MACH__)#ifndef MACOSX#define MACOSX#define _P1003_1B_VISIBLE#endif#ifndef _PTHREADS#define _PTHREADS 1#endif#endif#if defined(__FreeBSD__)#ifndef __BSD_VISIBLE#define __BSD_VISIBLE 1#endif#endif#ifdef _AIX#ifndef _ALL_SOURCE#define _ALL_SOURCE#endif#endif#ifdef __hpux#ifndef _XOPEN_SOURCE_EXTENDED#define _XOPEN_SOURCE_EXTENDED#endif#ifndef _INCLUDE_LONGLONG#define _INCLUDE_LONGLONG#endif#endif#define CCXX_PACKING#if defined(__GNUC__)#define CCXX_PACKED#elif !defined(__hpux) && !defined(_AIX)#define CCXX_PACKED#endif#if defined(__sun) || defined(__SUN__)#define __EXTENSIONS__ 1#endif#ifndef _REENTRANT#define _REENTRANT 1#endif#ifndef _THREAD_SAFE#define _THREAD_SAFE 1#endif#ifndef _GNU_SOURCE#define _GNU_SOURCE 1#endif#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) &&!defined(__OpenBSD__) && !defined(__MACH__) && !defined(__NetBSD__) #define _XOPEN_SOURCE 600#endif)if test "$prefix" != "/usr" ; then if test -d "$prefix" ; then bprefix="$prefix" else if test "$GCC" = "no" ; then bprefix=/usr/local ; fi fi if test -d $bprefix/include ; then COMMON_FLAGS="$COMMON_FLAGS -I$bprefix/include" fi if test -d $bprefix/lib ; then LIBS="$LIBS -L$bprefix/lib" fifiOST_PROG_COMMONOST_PROG_LIBVEROST_PROG_LIBRARY(CCXX,[$LT_VERSION])OST_AUTOMAKE_MODEOST_MAINTAINER_MODEOST_WINVEROST_WIN32OST_CC_FCNTLOST_CC_SYSTIMEOST_CC_TYPESOST_CC_ENDIANOST_CC_SIGNALOST_CC_STRINGOST_CC_GETOPTOST_CC_DYNAMICOST_LIB_PTHREADOST_LIB_REENTRANTOST_LIB_POLLOST_SYS_SOCKETAC_ARG_WITH(compression, [ --without-compression Disable libz compression], [OST_LIB_NOZLIB], [OST_LIB_ZLIB])AC_ARG_WITH(libxml2, [ --without-libxml2 Disable libxml2 parser], [OST_LIB_NOXML], [OST_LIB_XML])AC_ARG_WITH(memaudit, [ --with-memaudit Enable memory auditing], [AC_DEFINE(COMMON_MEMORY_AUDIT, [1], [enable auditing])])AC_ARG_WITH(cppunit, [ --with-cppunit Build cppunit based test suite], [if test "$withval" != "yes"; then CPPUNIT_LIBS="-l$withval" else CPPUNIT_LIBS="-lcppunit" fi],[CPPUNIT_LIBS=" "])AC_SUBST(CPPUNIT_LIBS)AM_CONDITIONAL(WITH_CPPUNIT_TESTS, test "$CPPUNIT_LIBS" != " ")AC_CHECK_HEADERS(sys/file.h sys/param.h sys/wait.h syslog.h syslog.hposix_evlog.h ss.h ioctl.h)AC_CHECK_FUNCS(realpath lstat snprintf memmove strdup lockf waitpid wait4 gettimeofday)AC_CHECK_FUNCS(posix_memalign setegid setpgrp getpagesize)# C++ stuff must done after library and header# (some C++ define require some header)OST_CXX_PROGRAMMING# allow build of library without exception handling, for use in # dedicated targets, etc...AC_ARG_WITH(exceptions, [ --without-exceptions Disable exception handling], [OST_CXX_NOEXCEPTIONS], [OST_CXX_EXCEPTIONS])OST_CXX_MUTABLEOST_CXX_NAMESPACEOST_CXX_IOSTREAMOST_CXX_NEW_INITOST_SGI_STLPORT# Are we using the GNU compiler?if test "$GCC" = yes ; then WARN_FLAGS="-pedantic -Wall"else WARN_FLAGS=""fiAC_SUBST(WARN_FLAGS)OST_DEBUGif test $ost_cv_gnuwin32 = yes ; then CCXX_DIR="\$(top_srcdir)/w32"else if test $np_cv_prog_msc = yes ; then CCXX_DIR="\$(top_srcdir)/w32" else CCXX_DIR="\$(top_srcdir)/include" fifiKDOC_DIR="\$(top_srcdir)/doc"AC_SUBST(LT_RELEASE)AC_SUBST(KDOC_DIR)AC_SUBST(CCXX_DIR)AC_SUBST(incprefix)AM_CONDITIONAL(WIN32, test $ost_cv_gnuwin32 = yes)AC_SUBST(ost_cv_dynloader)# some peculiar things needed for cygwin dll builds and the currently broken toolchain...SHARED_FLAGS=""MODULE_FLAGS="-module -shared"STAGE2=""BASE_LIB=""case "$target_os" inosf*) COMMON_FLAGS="$COMMON_FLAGS -D_POSIX_C_SOURCE=1 -D_OSF_SOURCE=1 -D__USE_STD_IOSTREAM" ;;cygwin*) BASE_LIB="../src/libccgnu2.la $XML_LIBS $ZSTREAM_LIBS" AC_DEFINE(CYGWIN_IMPORTS, [1], [cygwin environment]) SHARED_FLAGS="-no-undefined" MODULE_FLAGS="-module -shared -no-undefined" ;;darwin6*) MODULE_FLAGS="-dynamic -bundle -undefined suppress -flat_namespace -read_only_relocs suppress" STAGE2="macosx" AC_DEFINE(_DARWIN6_, [1], [darwin6 environment]) ;;darwin*) MODULE_FLAGS="-dynamic -bundle -undefined suppress -flat_namespace -read_only_relocs suppress" ;;esacAC_SUBST(COMMON_FLAGS)AC_SUBST(SHARED_FLAGS)AC_SUBST(MODULE_FLAGS)AC_SUBST(BASE_LIB) AC_SUBST(STAGE2)AC_SUBST(sysconfdir)AC_SUBST_DIR(etc_confdir, sysconfdir)if test "$sysconfdir" != '${prefix}/etc' ; then AC_DEFINE_UNQUOTED(ETC_PREFIX, "$etc_confdir/", [system config prefix])elif test "$sysconfdir" != '/etc' ; then AC_DEFINE_UNQUOTED(ETC_CONFDIR, "$etc_confdir/", [primary config prefix])fiAH_BOTTOM([#ifdef HAVE_SS_H#include <ss.h>#define COMMON_SECURE#endif#ifndef ETC_PREFIX#ifdef WIN32#define ETC_PREFIX "C:\\WINDOWS\\"#endif#ifndef ETC_PREFIX#define ETC_PREFIX "/etc/"#endif#endif#endif])AC_PATH_PROG(DOXYGEN, doxygen, no)AC_SUBST(DOXYGEN)AM_CONDITIONAL(DOXY, test "$DOXYGEN" != "no")AM_CONDITIONAL(GETOPT_LONG, [test ! -z "$LIBGETOPTOBJS"])AC_OUTPUT(src/ccgnu2-config src/libccext2.pc src/libccgnu2.pcsrc/Makefile w32/Makefile m4/Makefile doc/Doxyfiledoc/Makefile demo/Makefile include/Makefile include/cc++/Makefile Makefile template/Makefilecommoncpp2.spec tests/Makefile commoncpp2.list)cd include/cc++rm -f config.tmpcp ../config.h config.tmpsed -e s!"@thrprefix@"!"$thrprefix"! -e s!"@USR_PREFIX@"!"$prefix"! \ -e s!PACKAGE!CCXX_PACKAGE! -e s!VERSION!CCXX_VERSION! <config.tmp >config.hcd ../..
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -