📄 configure.in
字号:
dnl Copyright (C) 1999-2001 RTFM, Inc.dnl All Rights Reserveddnl Redistribution and use in source and binary forms, with or withoutdnl modification, are permitted provided that the following conditionsdnl are met:dnl 1. Redistributions of source code must retain the above copyrightdnl notice, this list of conditions and the following disclaimer.dnl 2. Redistributions in binary form must reproduce the above copyrightdnl notice, this list of conditions and the following disclaimer in thednl documentation and/or other materials provided with the distribution.dnl 3. All advertising materials mentioning features or use of this softwarednl must display the following acknowledgement:dnl dnl This product includes software developed by Eric Rescorla fordnl RTFM, Inc.dnldnl 4. Neither the name of RTFM, Inc. nor the name of Eric Rescorla may bednl used to endorse or promote products derived from thisdnl software without specific prior written permission.dnldnl THIS SOFTWARE IS PROVIDED BY ERIC RESCORLA AND RTFM, INC. ``AS IS'' ANDdnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEdnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSEdnl ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLEdnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALndnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODSdnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICTdnl LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAYdnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMAGE.dnl Process this file with autoconf to produce a configure script.AC_INIT(wserver.c)dnl AC_CANONICAL_SYSTEMdnl Checks for programs.AC_PROG_CCAC_PROG_MAKE_SETAC_MSG_RESULT(configuring for $target_os)dnl Replace `main' with a function in -lm:AC_CHECK_LIB(m, pow)dnl See if we can find OpenSSLdnl We can compile without OpenSSL if we have toac_use_openssl="true"ac_openssl_lib_dir="/usr/lib /usr/local /usr/local/ssl /usr/local/ssl/lib /usr/pkg"ac_openssl_inc_dir="/usr/include /usr/local /usr/local/ssl /usr/pkg /usr/local/ssl/include"AC_ARG_WITH(openssl,[--with-openssl root location for OpenSSL], if test "$withval" = "no"; then ac_use_openssl="false" else ac_openssl_lib_dir="$withval/lib $withval" ac_openssl_inc_dir=$withval/include fi)AC_ARG_WITH(openssl-inc,[--with-openssl-inc OpenSSL include files], ac_openssl_inc_dir=$withval)AC_ARG_WITH(openssl-lib,[--with-openssl-lib OpenSSL library files], ac_openssl_lib_dir=$withval)dnl Now look for OpenSSLif test "$ac_use_openssl" != "false"; then ac_found_openssl_inc_dir="no" AC_MSG_CHECKING(for OpenSSL include files) for dir in $ac_openssl_inc_dir; do if test -f $dir/openssl/ssl.h; then ac_found_openssl_inc_dir=$dir break fi done if test "$ac_found_openssl_inc_dir" != "no"; then echo "found in $ac_found_openssl_inc_dir" else echo "not found." ac_use_openssl="false" fifiif test "$ac_use_openssl" != "false"; then ac_found_openssl_lib_dir="no" AC_MSG_CHECKING(for OpenSSL libraries) for dir in $ac_openssl_lib_dir; do found_ssl="false" if test -f $dir/libssl.a -a -f $dir/libcrypto.a; then found_ssl="true" fi if test -f $dir/libssl.so -a -f $dir/libcrypto.so; then found_ssl="true" fi if $found_ssl != "false"; then dnl Ok, we think we've found them, but check that they dnl actually ontain the right functions save_LIBS=$LIBS save_LDFLAGS=$LDFLAGS LIBS="-lssl -lcrypto $LIBS" LDFLAGS="-L$dir $LDFLAGS" AC_TRY_LINK_FUNC(SSL_load_error_strings,ac_linked_libssl="true", ac_linked_libssl="false"); AC_TRY_LINK_FUNC(RC4_set_key,ac_linked_libcrypto="true", ac_linked_libcrypto="false"); if test "$ac_linked_libssl" != "false" -a \ "$ac_linked_libcrypto" != "false"; then ac_found_openssl_lib_dir=$dir break fi LIBS=$save_LIBS LDFLAGS=$save_LDFLAGS fi done if test "$ac_found_openssl_lib_dir" != "no"; then echo "found in $ac_found_openssl_lib_dir" INCLUDES="-I$ac_found_openssl_inc_dir $INCLUDES" DEFINES="-DOPENSSL $DEFINES" else echo "not found." ac_use_openssl="false" fifiif test "$ac_use_openssl" = "false"; then AC_MSG_ERROR(Couldn't find OpenSSL)fi dnl Checks for header files.AC_HEADER_STDCdnl Checks for library functions.AC_FUNC_MEMCMPAC_TYPE_SIGNALAC_FUNC_VPRINTFAC_CHECK_FUNCS(strdup)AC_SUBST(INCLUDES)AC_SUBST(DEFINES)AC_OUTPUT(Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -