📄 configure.in
字号:
# Source of configuration for Tokyo Cabinet#================================================================# Generic Settings#================================================================# Package nameAC_INIT(tokyocabinet, 1.3.18)# Package informationMYLIBVER=5MYLIBREV=13MYFORMATVER="1.0"# TargetsMYHEADERFILES="tcutil.h tchdb.h tcbdb.h tcfdb.h tcadb.h"MYLIBRARYFILES="libtokyocabinet.a"MYLIBOBJFILES="tcutil.o tchdb.o tcbdb.o tcfdb.o tcadb.o myconf.o md5.o"MYCOMMANDFILES="tcutest tcumttest tcucodec tchtest tchmttest tchmgr"MYCOMMANDFILES="$MYCOMMANDFILES tcbtest tcbmttest tcbmgr tcftest tcfmttest tcfmgr"MYCOMMANDFILES="$MYCOMMANDFILES tcatest tcamgr"MYCGIFILES="tcawmgr.cgi"MYMAN1FILES="tcutest.1 tcumttest.1 tcucodec.1 tchtest.1 tchmttest.1 tchmgr.1"MYMAN1FILES="$MYMAN1FILES tcbtest.1 tcbmttest.1 tcbmgr.1 tcftest.1 tcfmttest.1 tcfmgr.1"MYMAN1FILES="$MYMAN1FILES tcatest.1 tcamgr.1"MYMAN3FILES="tokyocabinet.3 tcutil.3 tcxstr.3 tclist.3 tcmap.3 tctree.3 tcmdb.3 tcmpool.3"MYMAN3FILES="$MYMAN3FILES tchdb.3 tcbdb.3 tcfdb.3 tcadb.3"MYDOCUMENTFILES="COPYING ChangeLog THANKS doc"MYPCFILES="tokyocabinet.pc"# Building flagsMYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1"MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"MYCMDLDFLAGS=""MYRUNPATH="\$(LIBDIR)"MYLDLIBPATHENV="LD_LIBRARY_PATH"MYPOSTCMD="true"# Building pathspathtmp="$PATH"PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"CPATH="$HOME/include:/usr/local/include:$CPATH"PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH#================================================================# Options#================================================================# Internal variablesenables=""# Debug modeAC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [build for debugging]))if test "$enable_debug" = "yes"then MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char -g -O0" MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG" MYCMDLDFLAGS="$MYCMDLDFLAGS -static" enables="$enables (debug)"fi# Developping modeAC_ARG_ENABLE(devel, AC_HELP_STRING([--enable-devel], [build for development]))if test "$enable_devel" = "yes"then MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char -g -O2 -pipe" MYCPPFLAGS="$MYCPPFLAGS -UNDEBUG" enables="$enables (devel)"fi# Profiling modeAC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [build for profiling]))if test "$enable_profile" = "yes"then MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char -g -pg -O2 -pipe" enables="$enables (profile)"fi# Static modeAC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build by static linking]))if test "$enable_static" = "yes"then MYCMDLDFLAGS="$MYCMDLDFLAGS -static" enables="$enables (static)"fi# Fastest modeAC_ARG_ENABLE(fastest, AC_HELP_STRING([--enable-fastest], [build for fastest run]))if test "$enable_fastest" = "yes"then MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char -O3" MYCFLAGS="$MYCFLAGS -fomit-frame-pointer -fforce-addr -minline-all-stringops" MYCPPFLAGS="$MYCPPFLAGS -D_MYFASTEST" enables="$enables (fastest)"fi# 64-bit offset modeAC_ARG_ENABLE(off64, AC_HELP_STRING([--enable-off64], [build with 64-bit file offset on 32-bit system]))if test "$enable_off64" = "yes"then MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64" enables="$enables (off64)"fi# Swapping byte-orders modeAC_ARG_ENABLE(swab, AC_HELP_STRING([--enable-swab], [build for swapping byte-orders]))if test "$enable_swab" = "yes"then MYCPPFLAGS="$MYCPPFLAGS -D_MYSWAB" enables="$enables (swab)"fi# Micro yield modeAC_ARG_ENABLE(uyield, AC_HELP_STRING([--enable-uyield], [build for detecting race conditions]))if test "$enable_uyield" = "yes"then MYCPPFLAGS="$MYCPPFLAGS -D_MYMICROYIELD" enables="$enables (uyield)"fi# Disable ZLIB compressionAC_ARG_ENABLE(zlib, AC_HELP_STRING([--disable-zlib], [build without ZLIB compression]))if test "$enable_zlib" = "no"then MYCPPFLAGS="$MYCPPFLAGS -D_MYNOZLIB" enables="$enables (no-zlib)"fi# Enable BZIP2 compressionAC_ARG_ENABLE(bzip, AC_HELP_STRING([--disable-bzip], [build without BZIP2 compression]))if test "$enable_bzip" = "no"then MYCPPFLAGS="$MYCPPFLAGS -D_MYNOBZIP" enables="$enables (no-bzip)"fi# Disable POSIX threadAC_ARG_ENABLE(pthread, AC_HELP_STRING([--disable-pthread], [build without POSIX thread support]))if test "$enable_pthread" = "no"then MYCPPFLAGS="$MYCPPFLAGS -D_MYNOPTHREAD" enables="$enables (no-pthread)"fi# Disable shared objectAC_ARG_ENABLE(shared, AC_HELP_STRING([--disable-shared], [avoid to build shared libraries]))if test "$enable_shared" = "no"then enables="$enables (no-shared)"fi# Enable custom codec functions of LZMAAC_ARG_ENABLE(exlzma, AC_HELP_STRING([--disable-exlzma], [build with the custom codec of LZMA]))if test "$enable_exlzma" = "yes"then MYCPPFLAGS="$MYCPPFLAGS -D_MYEXLZMA" enables="$enables (exlzma)"fi# Enable custom codec functions of LZOAC_ARG_ENABLE(exlzo, AC_HELP_STRING([--disable-exlzo], [build with the custom codec of LZO]))if test "$enable_exlzo" = "yes"then MYCPPFLAGS="$MYCPPFLAGS -D_MYEXLZO" enables="$enables (exlzo)"fi# Messagesprintf '#================================================================\n'printf '# Configuring Tokyo Cabinet version %s%s.\n' "$PACKAGE_VERSION" "$enables"printf '#================================================================\n'#================================================================# Checking Commands and Libraries#================================================================# Reset variablestest -n "$CFLAGS" && MYCFLAGS="$CFLAGS"test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS"test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS"# C compilerAC_PROG_CC# Byte orderAC_C_BIGENDIAN(MYCPPFLAGS="$MYCPPFLAGS -D_MYBIGEND")# Underlying librariesAC_CHECK_LIB(c, main)AC_CHECK_LIB(m, main)if test "$enable_pthread" != "no"then AC_CHECK_LIB(pthread, main)fiif test "$enable_zlib" != "no"then AC_CHECK_LIB(z, main)fiif test "$enable_bzip" != "no"then AC_CHECK_LIB(bz2, main)fiif test "$enable_exlzma" == "yes"then AC_CHECK_LIB(lzma, main)fiif test "$enable_exlzo" == "yes"then AC_CHECK_LIB(lzo2, main)fiAC_CHECK_LIB(tokyocabinet, main, AC_MSG_WARN([old version of Tokyo Cabinet was detected]))# Necessary headersAC_CHECK_HEADER(stdlib.h, true, AC_MSG_ERROR([stdlib.h is required]))AC_CHECK_HEADER(stdint.h, true, AC_MSG_ERROR([stdint.h is required]))AC_CHECK_HEADER(unistd.h, true, AC_MSG_ERROR([unistd.h is required]))AC_CHECK_HEADER(dirent.h, true, AC_MSG_ERROR([dirent.h is required]))AC_CHECK_HEADER(regex.h, true, AC_MSG_ERROR([regex.h is required]))AC_CHECK_HEADER(glob.h, true, AC_MSG_ERROR([glob.h is required]))if test "$enable_pthread" != "no"then AC_CHECK_HEADER(pthread.h, true, AC_MSG_ERROR([pthread.h is required]))fiif test "$enable_zlib" != "no"then AC_CHECK_HEADER(zlib.h, true, AC_MSG_ERROR([zlib.h is required]))fiif test "$enable_bzip" != "no"then AC_CHECK_HEADER(bzlib.h, true, AC_MSG_ERROR([bzlib.h is required]))fiif test "$enable_exlzma" == "yes"then AC_CHECK_HEADER(lzmalib.h, true, AC_MSG_ERROR([lzmalib.h is required]))fiif test "$enable_exlzo" == "yes"then AC_CHECK_HEADER(lzo/lzo1x.h, true, AC_MSG_ERROR([lzo/lzo1x.h is required]))fi# Shared librariesif test "$enable_shared" != "no" && test "$enable_profile" != "yes"then if uname | grep Darwin >/dev/null then MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.$MYLIBVER.$MYLIBREV.0.dylib" MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.$MYLIBVER.dylib" MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.dylib" MYLDLIBPATHENV="DYLD_LIBRARY_PATH" else MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.so.$MYLIBVER.$MYLIBREV.0" MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.so.$MYLIBVER" MYLIBRARYFILES="$MYLIBRARYFILES libtokyocabinet.so" fifi#================================================================# Generic Settings#================================================================# Export variablesAC_SUBST(MYLIBVER)AC_SUBST(MYLIBREV)AC_SUBST(MYFORMATVER)AC_SUBST(MYHEADERFILES)AC_SUBST(MYLIBRARYFILES)AC_SUBST(MYLIBOBJFILES)AC_SUBST(MYCOMMANDFILES)AC_SUBST(MYCGIFILES)AC_SUBST(MYMAN1FILES)AC_SUBST(MYMAN3FILES)AC_SUBST(MYDOCUMENTFILES)AC_SUBST(MYPCFILES)AC_SUBST(MYCFLAGS)AC_SUBST(MYCPPFLAGS)AC_SUBST(MYLDFLAGS)AC_SUBST(MYCMDLDFLAGS)AC_SUBST(MYRUNPATH)AC_SUBST(MYLDLIBPATHENV)AC_SUBST(MYPOSTCMD)# TargetsAC_OUTPUT(Makefile tokyocabinet.pc)# Messagesprintf '#================================================================\n'printf '# Ready to make.\n'printf '#================================================================\n'# END OF FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -