⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 mms client
💻 IN
📖 第 1 页 / 共 2 页
字号:
  check) AC_DEFINE(USE_GWMEM_CHECK)     AC_MSG_RESULT(checking malloc)     ;;  slow) AC_DEFINE(USE_GWMEM_SLOW)        AC_MSG_RESULT(slow malloc)	;;  *) AC_DEFINE(USE_GWMEM_NATIVE)          AC_MSG_RESULT(native malloc)          ;;  esac])dnl Implement --disable-assertions option.AC_ARG_ENABLE(assertions,[  --disable-assertions    turn off assertion checking], [  if test "$enableval" = "no"  then    echo disabling assertion checking    AC_DEFINE(NO_GWASSERT)  fi], [  if test "$assertiondefault" = "no"  then    echo disabling assertion checking    AC_DEFINE(NO_GWASSERT)  fi])dnl Implement the --enable-pam option.AC_ARG_ENABLE(pam,[  --enable-pam	          enable pam authentication (default: disabled)], [    if test "$enableval" = "yes"    then	AC_CHECK_LIB(pam, pam_end)	AC_CHECK_LIB(dl,main)	AC_CHECK_HEADERS(security/pam_appl.h)	PAMTARGET="pam"    else	PAMTARGET="no-pam"    fi])case "$PAMTARGET" inno-pam) echo pam authentication is disabled. ;;pam) echo pam authentication is enabled. ;;esacdnl Implement --enable-debug option.AC_ARG_ENABLE(debug,[  --enable-debug	  enable non-reentrant debugging for wmls compiler (default: disabled)], [  echo enabling WMLScript compiler debugging  if test -n "$GCC"; then    CFLAGS="$CFLAGS -Wall"  fi  AC_DEFINE(WS_DEBUG)])dnl Implement --enable-localtime option.AC_ARG_ENABLE(localtime,[  --enable-localtime	  log file time stamps in local time, not GMT (default: enabled)], [  if test "$enableval" = yes; then      echo enabling local time      AC_DEFINE(LOG_TIMESTAMP_LOCALTIME)  fi],[  echo enabling local time  AC_DEFINE(LOG_TIMESTAMP_LOCALTIME)])dnl --enable-mutex-stats option.AC_ARG_ENABLE(mutex-stats,[  --enable-mutex-stats    produce information about lock contention], [  if test "$enableval" = yes; then      AC_DEFINE(MUTEX_STATS)  fi])dnl --enable-cookies option.AC_ARG_ENABLE(cookies,[  --enable-cookies        enable cookie support for WSP (default: disabled)], [  if test "$enableval" = yes; then      AC_DEFINE(ENABLE_COOKIES)  fi])dnl --enable-start-stop-daemon option.AC_ARG_ENABLE(start-stop-daemon,[  --enable-start-stop-daemon  compile the start-stop-daemon program], [  if test "$enableval" = yes; then     STARTSTOPDAEMONSRC="utils/start-stop-daemon.c"  fi])AC_SUBST(STARTSTOPDAEMONSRC)dnl Implement the --with-ssl option. AC_CONFIG_SECTION([Configuring OpenSSL support])AC_ARG_WITH(ssl,[  --with-ssl[=DIR]        where to look for OpenSSL libs and header files                          DIR points to the installation [/usr/local/ssl]],[ if test -d "$withval"; then     ssllib="$withval/lib";     sslinc="$withval/include"  else    AC_MSG_ERROR(Unable to find OpenSSL libs and/or directories at $withval)  fi])dnl Implement --enable-ssl option.AC_MSG_CHECKING([whether to compile with SSL support])AC_ARG_ENABLE(ssl,[  --enable-ssl            enable SSL client and server support (default: enabled)], [  if test "$enableval" = no ; then    AC_MSG_RESULT(disabled)    ssl=no  else    ssl=yes  fi],[  ssl=yes])if test "$ssl" = "yes" ; then  dnl test only if --with-ssl has not been used  if test "x$ssllib" = "x" && test "x$sslinc" = "x"; then    for loc in /usr/lib /usr/local/ssl/lib /usr/local/openssl/lib; do       if test -f "$loc/libssl.a"; then        ssllib="$loc"      fi    done    for loc in /usr/include/ssl /usr/include/openssl /usr/local/ssl/include \               /usr/local/openssl/include; do      if test -d "$loc"; then        sslinc="$loc"      fi    done  fi  AC_MSG_RESULT(trying $ssllib $sslinc)fidnl Implement the SSL library checking routine. dnl This will define HAVE_LIBSSL in config.hif test "x$ssllib" != "x" && test "x$sslinc" != "x"; then  CFLAGS="$CFLAGS -I$sslinc"  LIBS="$LIBS -L$ssllib"  AC_PATH_PROG(OPENSSL, openssl, no)  if test "$OPENSSL" = "yes"; then    AC_MSG_CHECKING([openssl version])    openssl_version=`$OPENSSL version | awk '{print $2}'`    AC_MSG_RESULT([$openssl_version])  fi  AC_CHECK_LIB(crypto, CRYPTO_lock,  [ LIBS="$LIBS -lcrypto"    AC_CHECK_LIB(ssl, SSL_library_init,    [ AC_CHECK_LIB(ssl, SSL_connect)      AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \                       openssl/pem.h openssl/ssl.h openssl/err.h)      AC_MSG_CHECKING(whether the OpenSSL library is multithread-enabled)      AC_TRY_RUN([         #define OPENSSL_THREAD_DEFINES        #include <openssl/opensslconf.h>        int main(void) {        #if defined(THREADS)          exit(0);        #elif defined(OPENSSL_THREADS)          exit(0);        #else          exit(1);        #endif        }      ], [        AC_MSG_RESULT(yes)        AC_DEFINE(HAVE_LIBSSL)        LIBS="$LIBS -lssl"        AC_MSG_CHECKING([whether to compile with SSL support])	AC_MSG_RESULT(yes)      ], [        AC_ARG_ENABLE(ssl-thread-test,        [  --disable-ssl-thread-test  disable the multithread test for the OpenSSL library                          this will force to continue even if the test fails],        [ if test "$enableval" = no ; then            AC_MSG_RESULT([no, continue forced])          fi        ], [          AC_MSG_RESULT(no)          AC_MSG_ERROR(Either get a multithread-enabled SSL or configure with --disable-ssl)        ])      ], echo "Cross-compiling; make sure your SSL library is multithread-enabled"      )    ])  ])fiAC_CONFIG_SECTION([Configuring DB support])dnl Implement the --with-mysql option. AC_ARG_WITH(mysql,[  --with-mysql[=DIR]      where to look for MySQL libs and header files                          DIR points to the installation [/usr/local/mysql]],[ if test -d "$withval"; then     mysqlloc="$withval";   else    AC_MSG_ERROR(Unable to find MySQL libs and/or directories at $withval)  fi])dnl Implement the --enable-mysql option. This will set HAVE_MYSQL in config.hdnl accordingly and enable the usage of the libmysqlclient routines.AC_MSG_CHECKING([whether to compile with MySQL support])AC_ARG_ENABLE(mysql,[  --enable-mysql          enable MySQL storage (default: disabled)], [  if test "$enableval" != yes ; then    AC_MSG_RESULT(disabled)else  dnl test only if --with-mysql has not been used  if test "x$mysqlloc" = "x" ; then    AC_MSG_RESULT(searching)    AC_PATH_PROGS(MYSQL_CONFIG, mysql_config, no)    dnl check for MySQL 4.x style mysql_config information    if test "$MYSQL_CONFIG" = "no"; then      dnl mysql-3.x style       found=""      for loc in /usr /usr/local ; do         if test "x$found" = "x" ; then           AC_MSG_CHECKING([for MySQL client support in])          AC_MSG_RESULT($loc)          AC_CHECK_FILE("$loc/include/mysql/mysql.h",             [CFLAGS="$CFLAGS -I$loc/include/mysql"; LIBS="$LIBS -L$loc/lib/mysql -lmysqlclient"]; found=1,            [AC_CHECK_FILE("$loc/include/mysql.h",               [CFLAGS="$CFLAGS -I$loc/include"; LIBS="$LIBS -L$loc/lib -lmysqlclient"]; found=1             )]          )	fi      done      if test "x$found" != "x1" ; then         AC_MSG_ERROR(Unable to find mysql.h)      fi    else      dnl mysql-4.x style       AC_MSG_CHECKING([mysql version])      mysql_version=`$MYSQL_CONFIG --version`      AC_MSG_RESULT([$mysql_version])      LIBS="$LIBS `$MYSQL_CONFIG --libs`"      CFLAGS="$CFLAGS `$MYSQL_CONFIG --cflags`"    fi  else      AC_MSG_RESULT(searching in $mysqlloc)      AC_CHECK_FILE("$mysqlloc/include/mysql/mysql.h",         [CFLAGS="$CFLAGS -I$mysqlloc/include/mysql"; LIBS="$LIBS -L$mysqlloc/lib/mysql -lmysqlclient"],        [AC_CHECK_FILE("$mysqlloc/include/mysql.h",           [CFLAGS="$CFLAGS -I$mysqlloc/include"; LIBS="$LIBS -L$mysqlloc/lib -lmysqlclient"],          [AC_MSG_ERROR(Unable to find mysql.h under $mysqlloc)]         )]      )  fi  AC_CHECK_HEADERS(mysql/mysql.h mysql/mysql_com.h mysql/mysql_version.h)  AC_CHECK_LIB(mysqlclient, mysql_init)   AC_DEFINE(HAVE_MYSQL)  AC_MSG_CHECKING([whether to compile with MySQL support])  AC_MSG_RESULT(yes)  MYSQL="yes"  fi],[  AC_MSG_RESULT(disabled)])dnl Implement the --enable-sdb option. This will set HAVE_SDB in config.hdnl accordingly and enable the usage of the libsdb routines.AC_MSG_CHECKING([whether to compile with LibSDB support])AC_ARG_ENABLE(sdb,[  --enable-sdb            enable LibSDB storage (default: disabled)], [  if test "$enableval" != yes; then    AC_MSG_RESULT(disabled)  else    AC_MSG_RESULT(searching)    AC_PATH_PROGS(SDB_CONFIG, sdb-config, no)    if test "$SDB_CONFIG" = "no"; then      AC_MSG_ERROR(Unable to find sdb-config in path for SDB support)    else      AC_MSG_CHECKING([sdb version])      sdb_version=`$SDB_CONFIG --version`      AC_MSG_RESULT([$sdb_version])      LIBS="$LIBS `$SDB_CONFIG --libs`"      CFLAGS="$CFLAGS `$SDB_CONFIG --cflags`"      AC_CHECK_HEADERS(sdb.h)      dnl AC_CHECK_LIB(sdb, sdb_init, [LIBS="`$SDB_CONFIG --libs`"])       AC_CHECK_FUNCS(sdb_init)      AC_DEFINE(HAVE_SDB)      AC_DEFINE_UNQUOTED(LIBSDB_VERSION, "$sdb_version")      SDB="yes"    fi  fi],[  AC_MSG_RESULT(disabled)])dnl Implement the --with-dlr option.dnl Checks which external DLR storage should be used. AC_ARG_WITH(dlr,[  --with-dlr[=TYPE]       select DLR storage to use: internal/mysql/sdb (default: internal)], [ AC_CONFIG_SECTION([Configuring DLR support])   AC_MSG_CHECKING([for DLR storage type])  AC_MSG_RESULT($withval)  case "$withval" in  internal)    ;;  mysql)    if test "$MYSQL" != "yes"; then      AC_MSG_ERROR(Option --with-dlr=mysql requires MySQL client support)    else      AC_DEFINE(DLR_MYSQL)    fi    ;;  sdb)    if test "$SDB" != "yes"; then      AC_MSG_ERROR(Option --with-dlr=sdb requires SDB support)    else      AC_DEFINE(DLR_SDB)    fi    ;;  *)     AC_MSG_ERROR(Unknown DLR storage support!)    exit 1     ;;  esac])dnl Implement the --with-wtls option.dnl Check to see if we should include WTLS support, and which library to use.AC_ARG_WITH(wtls,[  --with-wtls[=TYPE]      select WTLS version to use: openssl/baltimore], [ AC_CONFIG_SECTION([Configuring WTLS support])   AC_MSG_CHECKING([for WTLS library])  AC_MSG_RESULT($withval)  case "$withval" in  openssl)  	OLDLIBS="$LIBS"	LIBS="$LIBS -L/usr/local/ssl/lib -lcrypto"    AC_CHECK_LIB(crypto, RSA_new,    [ AC_CHECK_HEADERS(openssl/objects.h openssl/rc5.h,         AC_DEFINE(HAVE_WTLS_OPENSSL),        AC_MSG_WARN(OpenSSL installation seems to lack RC5 algorithm!)      )	])	;;  baltimore)     AC_MSG_ERROR(This WTLS library is yet not supported!)    ;;  *)     AC_MSG_ERROR(Unknown WTLS libary support!)    exit 1     ;;  esac])dnl Final OutputAC_CONFIG_SECTION([Generating output files]) AC_OUTPUT(Makefile)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -