📄 configure.in
字号:
dnl This file is free software; you can redistribute it and/ordnl modify it under the terms of the GNU Library General Publicdnl License as published by the Free Software Foundation; eitherdnl version 2 of the License, or (at your option) any later version.dnl This library 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 the GNUdnl Library General Public License for more details.dnl You should have received a copy of the GNU Library General Public Licensednl along with this library; see the file COPYING.LIB. If not, write todnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,dnl Boston, MA 02111-1307, USA. dnl Various portions are taken from files which are:dnldnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)dnlAC_INIT(src/sites.c)AC_CONFIG_HEADER(config.h)dnl Setup some defaultsPACKAGE="sitecopy"VERSION="0.8.0"OBJECTS="src/sites.o src/ftp.o src/socket.o src/rcfile.o src/common.o"LIBOBJS="netrc.o basename.o dirname.o"dnl Autoconf mucks around with DEFS, otherwise we could use thatSDEFS="-DHAVE_CONFIG_H"dnl Optional featuresAC_ARG_ENABLE( webdav, [ --disable-webdav disable WebDAV support ], [with_WebDAV=$enableval], [with_WebDAV=yes]) dnl Defaults to ENABLEDif test "$with_WebDAV" = "yes"; then OBJECTS="$OBJECTS src/httpdav.o src/httpauth.o" LIBOBJS="$LIBOBJS md5.o strsplit.o base64.o dates.o" AC_DEFINE( USE_DAV )fiAC_ARG_ENABLE( debugging, [ --disable-debugging disable runtime debugging messages ], [with_debug=$enableval], [with_debug=yes]) dnl Defaults to ENABLEDAC_ARG_ENABLE( iis-propfind, [ --enable-iis-propfind enable workaround for broken IIS5-beta PROPFIND ], [AC_DEFINE( USE_BROKEN_PROPFIND )] )AC_ARG_ENABLE( warnings, [ --enable-warnings enable gcc warnings during build ], [with_warnings=$enableval], [with_warnings=no]) dnl Defaults to DISABLEDdnl Check for programsAC_PROG_CCAC_ISC_POSIXAC_PROG_INSTALLAC_LANG_CAC_C_INLINEAC_C_CONSTAC_HEADER_STDCAC_ARG_WITH( extra-includes, [ --with-extra-includes adds non standard include paths ], [CFLAGS="$CFLAGS -I$withval"])AC_ARG_WITH( extra-libs, [ --with-extra-libs adds non standard library paths ], [LDFLAGS="$LDFLAGS -L$withval"])dnl Linux 2.2 sendfile()?AC_ARG_WITH( lx22-sendfile, [ --with-lx22-sendfile EXPERIMENTAL: use Linux 2.2 sendfile() ], [with_lx22_sendfile=$enableval], [with_lx22_sendfile=no]) dnl Defaults to OFFif test "$with_lx22_sendfile" = "yes"; thenAC_MSG_CHECKING([for Linux 2.2 sendfile])AC_TRY_COMPILE([#include <sys/types.h> /* needed for off_t + size_t */#include <linux/unistd.h>_syscall4(int, sendfile, int, out_fd, int, in_fd, off_t *, offset, size_t, count);],[],[AC_MSG_RESULT(yes)AC_DEFINE(HAVE_LX22_SENDFILE)],[AC_MSG_RESULT(no)])fidnl Optionsif test "$with_debug" = "yes"; then AC_DEFINE( DEBUGGING )else dnl Strip the binary LDFLAGS="-s $LDFLAGS"fidnl Check for library functionsAC_FUNC_FNMATCHif test $ac_cv_func_fnmatch_works = no; then LIBOBJS="$LIBOBJS fnmatch.o"else AC_DEFINE( HAVE_SYS_FNMATCH )fidnl joe: Snagged from fetchmail.AC_CHECK_FUNC(socket, AC_MSG_RESULT(using libc's socket), AC_CHECK_LIB(socket,socket, [LIBS="$LIBS -lsocket"], AC_CHECK_LIB(inet,socket) ))# from fetchmail 4.7.8# joe: we don't actually USE the resolver functions.# but I think we need link with -lresolv in some cases.# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky# and breaks gethostbyname(2). It's better to use the bind stuff in the C# library. So don't add -lresolv to the link list unless it's necessary# (It will be necessary when using GNU libc6).AC_CHECK_FUNC(res_search, AC_MSG_RESULT(using libc's resolver functions), AC_CHECK_LIB(resolv,res_search, [AC_DEFINE(HAVE_RES_SEARCH) AC_MSG_RESULT(found resolver functions in libresolv); LIBS="$LIBS -lresolv"], AC_MSG_RESULT(no resolver calls found)))dnl Look for libexpatAC_CHECK_LIB(expat, XML_Parse, expat_libs="-lexpat" found_expatlibs="yes", AC_CHECK_LIB(xmlparse, XML_Parse, expat_libs="-lxmltok -lxmlparse" found_expatlibs="yes", found_expatlibs="no", -lxmltok) )if test "$found_expatlibs" = "yes"; then # This is crap. Maybe just use AC_CHECK_HEADERS and use the # right file by ifdef'ing is best AC_CHECK_HEADER(xmlparse.h, expat_incs="" found_expatincs="yes", AC_CHECK_HEADER(xmltok/xmlparse.h, expat_incs="-I/usr/include/xmltok" found_expatincs="yes", )) if test "$found_expatincs" = "yes"; then AC_DEFINE(HAVE_LIBEXPAT) if test "$expat_incs"; then CFLAGS="$CFLAGS $expat_incs" fi LIBS="$LIBS $expat_libs" else AC_MSG_WARN(["found expat library but could not find xmlparse.h"]) fifidnl Check for getopt_longAC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG), LIBOBJS="$LIBOBJS getopt.o getopt1.o" )dnl Check for strcasecmpAC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP), LIBOBJS="$LIBOBJS strcasecmp.o" )dnl Check for snprintfAC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF), LIBOBJS="$LIBOBJS snprintf.o" )dnl Check for stuffAC_CHECK_FUNCS(strdup strsignal strerror memcpy)AC_CHECK_HEADERS(stdarg.h string.h strings.h sys/time.h \ stdlib.h unistd.h limits.h termios.h sys/select.h)dnl Find out where gethostbyname isAC_CHECK_FUNC(gethostbyname, AC_MSG_RESULT(using libc's gethostbyname), AC_CHECK_LIB(nsl,gethostbyname) )dnl joe: This bit modified from KDE aclocal.m4, with C++ bits removeddnl Check for the type of the third argument of getsocknameAC_MSG_CHECKING(for the third argument of getsockname) AC_CACHE_VAL(ac_cv_ksize_t,[AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a);],ac_cv_ksize_t=socklen_t,ac_cv_ksize_t=)if test -z "$ac_cv_ksize_t"; thenac_safe_cflags="$CFLAGS"if test "$GCC" = "yes"; then CFLAGS="-Werror $CFLAGS"fiAC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[int a=0; getsockname(0,(struct sockaddr*)0, &a);],ac_cv_ksize_t=int,ac_cv_ksize_t=size_t)CFLAGS="$ac_safe_cflags"fi])if test -z "$ac_cv_ksize_t"; then ac_cv_ksize_t=intfiAC_MSG_RESULT($ac_cv_ksize_t)AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t)dnl snagged from fetchmail.dnl use option --with-socks=DIR to point at SOCKS libraryAC_ARG_WITH(socks, [ --with-socks[=DIR] add built-in SOCKS firewall access],[if test "$with_socks" != nothen if test "$with_socks" != yes then LDFLAGS="$LDFLAGS -L$with_socks" else AC_CHECK_LIB(socks, Rconnect,, AC_MSG_ERROR([could not find libsocks which is needed for built-in SOCKS support])) fi AC_DEFINE(HAVE_SOCKS) CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect" LIBS="-lsocks $LIBS"fi])if test "$with_warnings" = "yes"; then CFLAGS="$CFLAGS -Wall -ansi-pedantic -Wmissing-declarations -Winline -Wstrict-prototypes"fiAC_ARG_ENABLE( gnomefe, [ --enable-gnomefe enable Gnome front end ], [with_gnomefe=$enableval], [with_gnomefe=no]) dnl Defaults to DISABLEDif test "$with_gnomefe" = "yes"; then GNOME_INIT_HOOK GNOME_X_CHECKS AC_CHECK_LIB(pthread, pthread_create, gnome_is_ok=yes, gnome_is_ok=no)fidnl These, for getting the screen widthdnl AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTLdnl jm_WINSIZE_IN_PTEMdnl NLS stuffdnl AM_GNU_GETTEXTdnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)if test "$USE_NLS" = "yes"; then SDEFS="$SDEFS -DLOCALEDIR='\"\$(prefix)/share/locale\"'" NLSINSTALL="install-nls" NLSTARGS="subdirs" echo "NLS support will be built."else echo "NLS support will not be built."fidnl --------------------------------dnl FE configurationdnl --------------------------------if test "$with_gnomefe" = "yes"; then if test "$gnome_is_ok" = "yes"; then OBJECTS="gnome/fe_gnome.o gnome/fe_gnome_common.o gnome/fe_gnome_creation.o gnome/fe_gtk_main.o gnome/fe_gtk_site_widgets.o gnome/fe_gtk_changes.o gnome/fe_gtk_site_ops.o gnome/fe_gtk_excludes.o gnome/fe_gtk_file_widgets.o gnome/fe_gnome_resynch.o gnome/mguru.o gnome/fe_gnome_new_site.o $OBJECTS" LIBS="-lpthread $LIBS" GNOME_SC_HELPDIR="`gnome-config --datadir`/gnome/help/xsitecopy" SHORTCUT_LOCATION="`gnome-config --datadir`/gnome/apps/Internet" TARGET="xsitecopy" else AC_MSG_ERROR(["Could not validate the required gnome components. Check your system setup."]) fielse dnl Console front end... OBJECTS="src/console_fe.o $OBJECTS" LIBOBJS="$LIBOBJS rpmatch.o yesno.o" TARGET="sitecopy"fidnl config.h substitutionsAC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")AC_DEFINE_UNQUOTED(VERSION,"$VERSION")dnl Makefile substitutionsAC_SUBST(NLSINSTALL)AC_SUBST(NLSTARGS)AC_SUBST(GNOME_SC_HELPDIR)AC_SUBST(XSC_HELP)AC_SUBST(SHORTCUT_LOCATION)AC_SUBST(LIBS)AC_SUBST(INTLLIBS)AC_SUBST(LIBOBJS)AC_SUBST(LDFLAGS)AC_SUBST(CFLAGS)AC_SUBST(SDEFS)AC_SUBST(PACKAGE)AC_SUBST(VERSION)AC_SUBST(OBJECTS)AC_SUBST(TARGET)dnl Add this after Makefile for NLS, and uncomment the sed line.dnl intl/Makefile po/Makefile.inAC_OUTPUT(Makefile, [dnl sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefileecho echo "Configure finished. Now run 'make' to compile sitecopy."echoecho " (Note: You should use GNU make if this is not the default 'make'."echo " It may be installed as 'gmake' on your system.)"echo] )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -