?? configure.in
字號:
dnl Template file for GNU Autoconfdnl Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.dnl This program is free software; you can redistribute it and/or modifydnl it under the terms of the GNU General Public License as published bydnl the Free Software Foundation; either version 2 of the License, ordnl (at your option) any later version.dnl This program 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 thednl GNU General Public License for more details.dnl You should have received a copy of the GNU General Public Licensednl along with this program; if not, write to the Free Softwarednl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.dnl In addition, as a special exception, the Free Software Foundationdnl gives permission to link the code of its release of Wget with thednl OpenSSL project's "OpenSSL" library (or with modified versions of itdnl that use the same license as the "OpenSSL" library), and distributednl the linked executables. You must obey the GNU General Public Licensednl in all respects for all of the code used other than "OpenSSL". If youdnl modify this file, you may extend this exception to your version of thednl file, but you are not obligated to do so. If you do not wish to dodnl so, delete this exception statement from your version.dnldnl Process this file with autoconf to produce a configure script.dnlAC_INIT(src/version.c)AC_PREREQ(2.50)AC_CONFIG_HEADER(src/config.h)dnldnl What version of Wget are we building?dnlVERSION=`sed -e 's/^.*"\(.*\)";$/\1/' ${srcdir}/src/version.c`echo "configuring for GNU Wget $VERSION"AC_SUBST(VERSION)PACKAGE=wgetAC_SUBST(PACKAGE)dnldnl Get cannonical hostdnlAC_CANONICAL_HOSTAC_DEFINE_UNQUOTED(OS_TYPE, "$host_os")dnldnl Process features.dnlAC_ARG_WITH(socks,[ --with-socks use the socks library],[AC_DEFINE(HAVE_SOCKS)])AC_ARG_WITH(ssl,[[ --with-ssl[=SSL-ROOT] link with SSL support [default=auto] --without-ssl disable SSL autodetection]])AC_ARG_ENABLE(opie,[ --disable-opie disable support for opie or s/key FTP login],USE_OPIE=$enableval, USE_OPIE=yes)test x"${USE_OPIE}" = xyes && AC_DEFINE(USE_OPIE)AC_ARG_ENABLE(digest,[ --disable-digest disable support for HTTP digest authorization],USE_DIGEST=$enableval, USE_DIGEST=yes)test x"${USE_DIGEST}" = xyes && AC_DEFINE(USE_DIGEST)AC_ARG_ENABLE(debug,[ --disable-debug disable support for debugging output],ENABLE_DEBUG=$enableval, ENABLE_DEBUG=yes)test x"${ENABLE_DEBUG}" = xyes && AC_DEFINE(ENABLE_DEBUG)wget_need_md5=nocase "${USE_OPIE}${USE_DIGEST}" in*yes*) wget_need_md5=yesesacif test x"$USE_OPIE" = xyes; then OPIE_OBJ='ftp-opie$o'fiAC_SUBST(OPIE_OBJ)dnldnl Whether make sets $(MAKE)...dnlAC_PROG_MAKE_SETdnldnl Find a good installdnlAC_PROG_INSTALLdnldnl Find the compilerdnldnl We want these before the checks, so the checks can modify their values.test -z "$CFLAGS" && CFLAGS= auto_cflags=1test -z "$CC" && cc_specified=yesAC_PROG_CCdnldnl if the user hasn't specified CFLAGS, thendnl if compiler is gcc, then use -O2 and some warning flagsdnl else use os-specific flags or -Odnlif test -n "$auto_cflags"; then if test -n "$GCC"; then CFLAGS="$CFLAGS -O2 -Wall -Wno-implicit" else case "$host_os" in *hpux*) CFLAGS="$CFLAGS +O3" ;; *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;; *) CFLAGS="$CFLAGS -O" ;; esac fifidnldnl Handle AIXdnlAC_AIXdnldnl Configure our included libtool and make sure it's regenerated when neededdnlAC_PROG_LIBTOOLAC_SUBST(LIBTOOL_DEPS)dnldnl In case of {cyg,gnu}win32. Should be a _target_ test.dnl Might also be erelevant for DJGPP.dnlcase "$host_os" in *win32) exeext='.exe';; *) exeext='';;esacAC_SUBST(exeext)dnldnl Check if we can handle prototypes.dnlAM_C_PROTOTYPESdnldnl Checks for typedefs, structures, and compiler characteristics.dnlAC_C_CONSTAC_C_INLINEAC_TYPE_SIZE_TAC_TYPE_PID_TAC_C_BIGENDIANdnldnl Check integral type sizes.dnlAC_CHECK_SIZEOF(short)AC_CHECK_SIZEOF(int)AC_CHECK_SIZEOF(long)AC_CHECK_SIZEOF(long long)AC_CHECK_HEADERS(inttypes.h)AC_CHECK_TYPES(uint32_t)dnldnl Checks for headersdnlAC_CHECK_HEADERS(string.h stdarg.h unistd.h sys/time.h utime.h sys/utime.h pwd.h)AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h sys/utsname.h)AC_CHECK_HEADERS(signal.h setjmp.h)AC_HEADER_TIMEdnldnl Return type of signal-handlersdnlAC_TYPE_SIGNALdnldnl Call several of Wget's macros.dnlWGET_STRUCT_UTIMBUFWGET_SOCKLEN_TWGET_FNMATCHdnldnl Checks for library functions.dnlAC_FUNC_ALLOCAAC_FUNC_MMAPAC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp strpbrk memmove)AC_CHECK_FUNCS(gettimeofday mktime strptime strerror snprintf vsnprintf)AC_CHECK_FUNCS(select sigblock sigsetjmp signal symlink access isatty)AC_CHECK_FUNCS(uname gethostname usleep)dnldnl Check if we need to compile in getopt.c.dnlAC_CHECK_FUNC(getopt_long, [], [ GETOPT_OBJ='getopt$o'])AC_SUBST(GETOPT_OBJ)dnldnl Checks for libraries.dnldnl On Solaris, -lnsl is needed to use gethostbyname. On "NCR MP-RASdnl 3.0", however, gethostbyname is in libc, but -lnsl is still neededdnl to use -lsocket, as well as for functions such as inet_ntoa. Wednl look for such known offenders and if one of them is not found, wednl check if -lnsl is needed.wget_check_in_nsl=NONEAC_CHECK_FUNCS(gethostbyname, [], [ wget_check_in_nsl=gethostbyname])AC_CHECK_FUNCS(inet_ntoa, [], [ wget_check_in_nsl=inet_ntoa])if test $wget_check_in_nsl != NONE; then AC_CHECK_LIB(nsl, $wget_check_in_nsl)fiAC_CHECK_LIB(socket, socket)dnl #### This appears to be deficient with later versions of SOCKS.if test "x${with_socks}" = xyesthen AC_CHECK_LIB(resolv, main) AC_CHECK_LIB(socks, Rconnect)fidnl $with_ssl can be one of:dnl - empty string or "auto", meaning autodetect SSL and use it if found.dnl - "yes", meaning link with SSL or bail out.dnl - "no", meaning don't link with SSL.dnl - anything else, meaning use that as the SSL root, and bail outdnl if it fails.if test x"$with_ssl" = x; then dnl Canonicalize unspecified with-ssl setting to "auto". This dnl implements the "auto-detect by default" feature. If you want to dnl change this to "ignore SSL by default", change "auto" to "no". with_ssl=autofidnl Detection of OpenSSL is much hairier than the detection of otherdnl libraries because OpenSSL can be compiled as a third-partydnl library, which means it will not be found without additionaldnl linker magic. It would be really nice to rework this check intodnl an AC_DEFUN so that we can reuse it for other third-partydnl libraries.if test x"$with_ssl" != x"no"; then wget_force_ssl=no if test x"$with_ssl" = x"yes"; then wget_force_ssl=yes fi if test x"$with_ssl" = x"yes" || test x"$with_ssl" = x"auto"; then dnl OpenSSL's root was not specified, so we have to guess. First dnl try the system default location, then "/usr/local/ssl" (where dnl OpenSSL installs by default), then "/usr/local" (traditional dnl choice for installation root), then "/opt". ssl_all_roots="system-default /usr/local/ssl /usr/local /opt" else dnl Root has been specified by the user. ssl_all_roots=$with_ssl wget_force_ssl=yes fi wget_save_CC=$CC wget_save_LIBS=$LIBS wget_save_LDFLAGS=$LDFLAGS wget_save_CPPFLAGS=$CPPFLAGS dnl Use libtool for OpenSSL tests so we can specify "-R<rpath>" dnl without having to know how the linker handles it. CC="$SHELL ./libtool $CC" dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto dnl shared library doesn't record its dependency on libdl, so we dnl need to check for it ourselves so we won't fail to link due to a dnl lack of -ldl. Most OSes use dlopen(), but HP-UX uses
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -