📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(src/crctab.c)AM_INIT_AUTOMAKE(lrzsz, 0.12.20)AM_CONFIG_HEADER(config.h)dnl AC_C_CROSS is in AC_PROG_CC since 2.12AC_PREREQ(2.12)PACKAGE_VERSION="$PACKAGE-$VERSION"AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")AC_DEFINE_UNQUOTED(VERSION, "$VERSION")AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION")AC_SUBST(PACKAGE)AC_SUBST(VERSION)AC_SUBST(PACKAGE_VERSION)ALL_LINGUAS="de"AC_SUBST(PACKAGE)AC_SUBST(VERSION)changequote(,)dnlcase $VERSION in [0-9]*.[0-9]*.[0-9]*) README_ALPHA="README-alpha";; *) README_ALPHA=;;esacchangequote([, ])dnlAC_ARG_ENABLE(timesync, [--disable-timesync exclude support for timesync protocol], [if test "$enableval" = "no" ; then : else AC_DEFINE(ENABLE_TIMESYNC) fi], [AC_DEFINE(ENABLE_TIMESYNC)])AC_SUBST(ENABLE_TIMESYNC)AC_ARG_ENABLE(pubdir, [--enable-pubdir=/path include support for a public writeable directory], [if test "$enableval" = "no" ; then : else AC_DEFINE_UNQUOTED(PUBDIR,"$enableval") fi])AC_ARG_ENABLE(mkdir, [--disable-mkdir disable support for creating directories (lrz)], [if test "$enableval" = "no" ; then : else AC_DEFINE(ENABLE_MKDIR) fi], [AC_DEFINE(ENABLE_MKDIR)])AC_ARG_ENABLE(syslog, [--enable-syslog=FACILITY,{force,default,optional} include syslogsupport], [ if test "$enableval" = "no" ; then : else case "$enableval" in *,*) level=`echo $enableval|sed -e 's/^.*,//'` fac=`echo $enableval|sed -e 's/,.*$//'` AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$fac) ;; *) lookup_facility=LOG_UUCP level="$enableval" ;; esac if test "$level" = "force" ; then AC_DEFINE(ENABLE_SYSLOG_FORCE) else if test "$level" = "optional" ; then : else AC_DEFINE(ENABLE_SYSLOG_DEFAULT) fi fi fi],[ AC_DEFINE(ENABLE_SYSLOG_DEFAULT) lookup_facility=LOG_UUCP ])dnl Checks for programs.AC_PROG_CCAC_PROG_GCC_TRADITIONALdnl AC_PROG_INSTALL included in AM_INIT_AUTOMAKEdnl AC_PROG_MAKE_SET included in AM_INIT_AUTOMAKEAC_PROG_RANLIBAC_ISC_POSIXAC_AIXAC_MINIXAM_C_PROTOTYPESAC_C_CONSTAC_C_INLINEif test `hostname` = tirka.ohse.de -a "$cross_compiling" = no ; then test $prefix = NONE && prefix=/usr if test -z "$CFLAGS" ; then case "$CC" in *gcc*) CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes" # -Wnested_externs entfernt wegen dcgettext() CFLAGS="$CFLAGS -Wpointer-arith -Wcast-qual -Wcast-align" CFLAGS="$CFLAGS -Winline -Wwrite-strings -Wshadow -Wmissing-braces" CFLAGS="$CFLAGS -Wcomments -fforce-mem -fforce-addr -O2 -m486 -pipe" CFLAGS="$CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2 -g3" ;; esac fificase "$CFLAGS" in*-Wstrict-prototypes*) AC_DEFINE(STRICT_PROTOTYPES) ;;esacdnl Checks for libraries.dnl SCO needs this.AC_CHECK_LIB(socket,syslog,,,)dnl BeOS needs thisAC_CHECK_LIB(be,syslog,,,)dnl slowlartis needs thisAC_CHECK_LIB(nsl,gethostbyname,,,)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h sys/times.h)LRZSZ_HEADERS_TERM_IOAC_CHECK_HEADERS(termios.h sys/termios.h termio.h sys/termio.h sgtty.h)AC_CHECK_HEADERS(sys/mman.h utime.h syslog.h sys/syslog.h sys/param.h)AC_CHECK_HEADERS(sys/select.h strings.h arpa/inet.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_TYPE_SIZE_TAC_TYPE_MODE_TAC_TYPE_OFF_TLRZSZ_TYPE_SPEED_TAC_STRUCT_ST_RDEVAC_HEADER_TIMElrzsz_HEADER_SYS_SELECTAC_STRUCT_TMLRZSZ_ERRNO_DECLdnl Checks for library functions.if test $cross_compiling = no ; then AC_FUNC_SETVBUF_REVERSEDfiAC_TYPE_SIGNALdnl suggested by autoscan, but not really needed.dnl AC_FUNC_UTIME_NULLAC_FUNC_MMAPAC_FUNC_ALLOCAAC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))AC_CHECK_FUNCS(gettimeofday settimeofday)AC_CHECK_FUNCS(strchr memcpy select vprintf)AC_CHECK_FUNCS(times rdchk utime syslog siginterrupt)AC_REPLACE_FUNCS(mkdir mktime strerror strstr strdup strtoul strtol strpbrk)AC_REPLACE_FUNCS(stpcpy strftime vasprintf)AC_REPLACE_GNU_GETOPTdnl for lib/error.cAC_DEFINE(HAVE_STRERROR)dnl special testsdnl this is taken from taylor uucp.dnl Check for the SCO buggy ftime; the code can cope with the bug,dnl though it would prefer not to, so if we're cross-configuring wednl accept that ftime exists.AC_CHECK_FUNC(ftime,[AC_MSG_CHECKING(that ftime works correctly)AC_CACHE_VAL(lrzsz_cv_sys_ftime_ok,[AC_TRY_RUN([#include <sys/types.h>#include <sys/timeb.h>#include <stdio.h>main (){ struct timeb s, slast; int c = 0; ftime (&slast); while (c < 10) { ftime (&s); if (s.time < slast.time || (s.time == slast.time && s.millitm < slast.millitm)) { fprintf(stderr,"s: %ld, %ld, slast: %ld, %ld\n", s.time,s.millitm, slast.time,slast.millitm); exit (1); } if (s.time != slast.time) ++c; slast.time = s.time; slast.millitm = s.millitm; } exit (0);}],lrzsz_cv_sys_ftime_ok=yes,lrzsz_cv_sys_ftime_ok=no,lrzsz_cv_sys_ftime_ok=runtime)])case $lrzsz_cv_sys_ftime_ok inyes) AC_DEFINE(HAVE_FTIME) AC_MSG_RESULT(yes) ;;no) AC_MSG_RESULT(no) AC_MSG_WARN(ftime seems to be buggy) ;;runtime) AC_DEFINE(HAVE_FTIME) AC_MSG_RESULT(will check at run time) ;;esac])dnlAC_MSG_CHECKING([for timezone variable])AC_CACHE_VAL(libquark_cv_var_timezone,[AC_TRY_LINK([#include <time.h>],[return(int)(timezone/2);], [libquark_cv_var_timezone=yes], [libquark_cv_var_timezone=no])])if test $libquark_cv_var_timezone = yes ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_TIMEZONE_VAR)else AC_MSG_RESULT(no)fiif test "x$lookup_facility" = x ; then :else AC_MSG_CHECKING([for $lookup_facility]) AC_CACHE_VAL(lrzsz_cv_lookup_facility,[ AC_EGREP_CPP(ihave$lookup_facility, [#ifdef HAVE_SYSLOG_H#include <syslog.h>#else#include <sys/syslog.h>#endif#ifdef $lookup_facilityihave$lookup_facility#endif ], lrzsz_cv_lookup_facility=yes, lrzsz_cv_lookup_facility=no) ]) if test $lrzsz_cv_lookup_facility = yes ; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$lookup_facility) else AC_DEFINE(ENABLE_SYSLOG,LOG_USER) AC_MSG_RESULT(no) fifiAC_SUBST(CFLAGS)AC_SUBST(LDFLAGS)AC_SUBST(LIBS)AM_GNU_GETTEXTAC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \src/lrzszbug],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; chmod +x debian/rules;test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -