📄 configure.in
字号:
################### Start of $RCSfile: configure.in,v $ #################### $Source: /home/alb/afbackup/afbackup-3.3.8.1/RCS/configure.in,v $# $Id: configure.in,v 1.6 2005/01/15 08:50:35 alb Exp alb $# $Date: 2005/01/15 08:50:35 $# $Author: alb $######### description #######################################################################################################################dnl Process this file with autoconf to produce a configure script.AC_INIT(backup.h)PACKAGE=afbackupVERSION=`[grep VERSION_STRING version.h|sed 's/^[^"]*"//g'|sed 's/"[^"]*$//g']`dnl VERSION=`[grep VERSION_STRING version.h|awk '{l=$0;while(substr(l,1,1)!="\"" && l != "")l=substr(l,2);l=substr(l,2);while(substr(l,length(l)-1,1)!="\"" && l != "") l=substr(l,1,length(l)-1);l=substr(l,1,length(l)-1);print l}']`AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")AC_DEFINE_UNQUOTED(VERSION, "$VERSION")AC_SUBST(PACKAGE)AC_SUBST(VERSION)ALL_LINGUAS="it de"osname=`./prosname.sh`ARCH="`./prosspec.sh` $*"ARCH="`echo $ARCH`" # for some stupid shellsif test -r config.setup ; then CONFARCH=`cat config.setup` if test "$CONFARCH" = "$ARCH" ; then echo "Already configured for this setup. Remove config.setup to re-configure." exit 0 fifirm -f config.setupAC_CONFIG_HEADER(config.h)dnl initial settingsLDFLAGS="$EXTERNAL_LDFLAGS $LDFLAGS"INCLUDES="$EXTERNAL_INCLUDES $INCLUDES"dnl Checks for programs.AC_PROG_CCAC_PROG_CPPAC_CHECK_PROG(ranlib, ranlib, ranlib)AC_PROG_LN_Sdnl Checks for libraries.dnl Checks for header files.if test `uname` = "FreeBSD" ; then if test -r /usr/include/values.h ; then ac_cv_header_values_h=yes else ac_cv_header_values_h=no fifiAC_ISC_POSIXAM_GNU_GETTEXTAC_HEADER_DIRENTAC_HEADER_STDCdnl AC_HEADER_SYS_WAITAC_CHECK_HEADERS(arpa/inet.h fcntl.h intl/locale.h limits.h malloc.h mntent.h netinet/ip.h netinet/tcp.h netinet/in_systm.h pthread.h regex.h stdint.h string.h strings.h sys/acl.h sys/fs_types.h sys/ioctl.h sys/mman.h sys/mode.h sys/mntctl.h sys/mnttab.h sys/mount.h sys/mtio.h sys/param.h sys/resource.h sys/select.h sys/statfs.h sys/statvfs.h sys/time.h sys/timers.h sys/ucred.h sys/vfs.h sys/vmount.h sys/wait.h termios.h termio.h time.h unistd.h values.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_STRUCT_ST_RDEVAC_HEADER_TIMEAC_STRUCT_TMdnl Checks for library functions.AC_FUNC_ALLOCAAC_PROG_GCC_TRADITIONALAC_FUNC_MEMCMPAC_TYPE_SIGNALAC_FUNC_UTIME_NULLAC_FUNC_VPRINTFdnl Used by po/Makefile.inAC_PROG_INSTALL# This seems to have been forgotten for some strange reasonif test _"${gt_cv_func_gettext_libintl}" = _yes -o _"$ac_cv_lib_intl_bindtextdomain" = _yes ; then INTLLIBS="$INTLLIBS -lintl"fiINTL_HEADER="$nls_cv_header_intl"AC_SUBST(INTL_HEADER)AC_MSG_CHECKING(for sys_errlist declaration)AC_CACHE_VAL(ac_cv_decl_sys_errlist_def,[AC_TRY_COMPILE([#include <stdio.h>#include <errno.h>#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#ifdef HAVE_UNISTD_H#include <unistd.h>#endif],[printf("%s",sys_errlist[0]);],ac_cv_decl_sys_errlist_def=yes, ac_cv_decl_sys_errlist_def=no)])AC_MSG_RESULT($ac_cv_decl_sys_errlist_def)if test $ac_cv_decl_sys_errlist_def = yes; then AC_DEFINE(HAVE_SYS_ERRLIST_DEF)fiOPTIMIZE=-O2if test $ac_cv_prog_gcc = no -a `echo $osname|grep 'HPUX'|wc -l` -gt 0 ; then EXTRACFLAGS="+Olibcalls -Ae -Dhpux -D__hpux -Dunix -Dnotdef" OPTIMIZE=-OfiAC_CHECK_TYPE(signal_t, int)AC_CHECK_TYPE(int32_t, int)AC_CHECK_TYPE(int16_t, short int)AC_CHECK_TYPE(int8_t, signed char)AC_CHECK_TYPE(uint32_t, unsigned)AC_CHECK_TYPE(uint16_t, unsigned short)AC_CHECK_TYPE(uint8_t, unsigned char)dnl wasses net alles gibtAC_CHECK_TYPE(u_int32_t, unsigned)AC_CHECK_TYPE(u_int16_t, unsigned short)AC_CHECK_TYPE(u_int8_t, unsigned char)AC_ARG_ENABLE(threads, [ --disable-threads do not configure threads], if test "x$enable_threads" != xyes; then enable_threads=no; fi, enable_threads=yes)if test $enable_threads = yes ; then # cannot use pthread_create here, cause IRIX will fail compiling. # Solaris has pthread functions in libc, but they don't work, so # we have to check for libpthread or libthread FIRST. # BTW the m4 autoconf syntax constraints are terrible. AC_CHECK_LIB(pthread, pthread_join, libpthread=yes, libpthread=no) if test $libpthread = yes ; then AC_DEFINE(HAVE_PTHREAD_JOIN) LIBS="$LIBS -lpthread" else AC_CHECK_LIB(thread, pthread_join, libthread=yes, libthread=no) if test $libthread = yes ; then LIBS="$LIBS -lthread" AC_DEFINE(HAVE_PTHREAD_JOIN) else AC_CHECK_FUNC(pthread_join, libc=yes, libc=no) if test $libc = yes ; then AC_DEFINE(HAVE_PTHREAD_JOIN) else AC_MSG_CHECKING(for FreeBSD-like pthreads) LIBS_BEFORE="$LIBS" CPPFLAGS_BEFORE="$CPPFLAGS" LIBS="$LIBS -pthread" CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" AC_CACHE_VAL(ac_cv_decl_freebsd_pthreads, [AC_TRY_LINK([#include <stdio.h>#include <errno.h>#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#ifdef HAVE_UNISTD_H#include <unistd.h>#endif],[pthread_join();], ac_cv_decl_freebsd_pthreads=yes, ac_cv_decl_freebsd_pthreads=no) ]) AC_MSG_RESULT($ac_cv_decl_freebsd_pthreads) if test $ac_cv_decl_freebsd_pthreads = yes; then AC_DEFINE(HAVE_PTHREAD_JOIN) SYSDEFINES="$SYSDEFINES -D_THREAD_SAFE" else LIBS="$LIBS_BEFORE" CPPFLAGS="$CPPFLAGS_BEFORE" fi fi fi fificheckBoth=0AC_CHECK_FUNC(connect, checkSocket=0, checkSocket=1)if test "$checkSocket" = 1; then AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)fiif test "$checkBoth" = 1; then oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, checkNsl=0, [LIBS=$oldLibs])fiAC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))AC_CHECK_FUNCS(bsearch door_create drand48 endmntent getcwd getfsstat getipnodebyname getipnodebyaddr getmntent gettimeofday inet_ntoa inet_ntop isatty isnan lchown lfind lsearch madvise memmove mkfifo mktime mnt_names mntctl putenv qsort rand re_comp regcomp re_compile_pattern rint seed48 select setenv seteuid setreuid setresuid setegid setmntent setregid setresgid setitimer sighold sigrelse socket strcasecmp strncasecmp strcasestr strdup strerror strrstr strstr timer_create uname acl setacl chacl sys_errlist stat64 statfs statvfs unsetenv vsnprintf vsyslog)AC_MSG_CHECKING(for environ array)AC_CACHE_VAL(ac_cv_decl_environ,[AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H#include <unistd.h>#endifextern char ** environ;],[printf("%s",environ[0]);],ac_cv_decl_environ=yes, ac_cv_decl_environ=no)])AC_MSG_RESULT($ac_cv_decl_environ)if test $ac_cv_decl_environ = yes; then AC_DEFINE(HAVE_ENVIRON)fiAC_CHECK_LIB(acl, acl_get_file, acl_get_file=yes, acl_get_file=no)if test $acl_get_file = yes ; then LIBS="-lacl $LIBS"else AC_CHECK_LIB(pacl, acl_get_file, acl_get_file=yes, acl_get_file=no) if test $acl_get_file = yes ; then LIBS="-lpacl $LIBS" else SAVED_LIBS="$LIBS" LIBS="-lacl $LIBS" AC_CHECK_LIB(attr, acl_get_file, acl_get_file=yes, acl_get_file=no) if test $acl_get_file = yes ; then LIBS="-lattr $LIBS" else LIBS="-lattr $SAVED_LIBS" unset ac_cv_lib_acl_acl_get_file AC_CHECK_LIB(acl, acl_get_file, acl_get_file=yes, acl_get_file=no) if test $acl_get_file = yes ; then LIBS="-lacl $LIBS" else LIBS="$SAVED_LIBS" AC_CHECK_FUNC(acl_get_file, acl_get_file=yes, acl_get_file=no) fi fi fifiif test "$ac_cv_func_re_comp" != yes ; then AC_CHECK_LIB(compat, re_comp, [LIBS="$LIBS -lcompat"]) unset ac_cv_func_re_comp AC_CHECK_FUNCS(re_comp)fiif test "$ac_cv_func_stat64" = yes ; then AC_DEFINE(_64_BIT_FILESIZE_)fiif test "$ac_cv_func_getmntent" = yes ; then AC_MSG_CHECKING(for two-args getmntent) AC_CACHE_VAL(ac_cv_two_args_getmntent, AC_TRY_LINK_WITH_TEST([#include <stdio.h>#include <signal.h>void sigh(int sig){ exit(42); }], [ FILE * fp; signal(SIGSEGV, sigh); signal(SIGBUS, sigh); fp = fopen("/etc/passwd", "r"); /* file exists on every Unix */ getmntent(fp, (void*)1); /* segfault, if 2nd argument used */], $ac_word, ac_cv_two_args_getmntent=no, ac_cv_two_args_getmntent=yes)) AC_MSG_RESULT($ac_cv_two_args_getmntent)fiif test _"$ac_cv_two_args_getmntent" = _yes ; then AC_DEFINE(HAVE_GETMNTENT_TWO_ARGS)fiif test "$ac_cv_func_statfs" = yes -a "$ac_cv_func_statvfs" = no ; then AC_MSG_CHECKING(for f_bavail in struct statfs) AC_CACHE_VAL(ac_cv_struct_stat_bavail, AC_TRY_LINK([#ifdef HAVE_SYS_PARAM_H#include <sys/param.h> /* this one is for FreeBSD */#endif#include <sys/types.h> /* this one is for SunOS-4 */#ifdef HAVE_SYS_VFS_H#include <sys/vfs.h>#endif#ifdef HAVE_SYS_STATFS_H#include <sys/statfs.h>#endif#ifdef HAVE_SYS_MOUNT_H#include <sys/mount.h>#endif], [ struct statfs statfsb; statfsb.f_bavail; ], ac_cv_struct_stat_bavail=yes, ac_cv_struct_stat_bavail=no)) AC_MSG_RESULT($ac_cv_struct_stat_bavail)else ac_cv_func_statvfs=yesfiif test _"$ac_cv_struct_stat_bavail" = _yes ; then AC_DEFINE(HAVE_STRUCT_STAT_BAVAIL)fiAC_MSG_CHECKING(for IPv6 implementation)AC_CACHE_VAL(ac_cv_struct_in6_addr, AC_TRY_LINK([#include <netinet/in.h>], [ struct in6_addr in6; struct sockaddr_in6 sock6; ], ac_cv_struct_in6_addr=yes, ac_cv_struct_in6_addr=no))AC_MSG_RESULT($ac_cv_struct_in6_addr)if test _"$ac_cv_struct_in6_addr" = _yes ; then AC_DEFINE(HAVE_IP6)fitest "x$prefix" = xNONE && prefix=$ac_default_prefixtest "x$exec_prefix" = xNONE && exec_prefix=${prefix}deftmpdir="/tmp"AC_ARG_WITH(tmpdir, [ --with-tmpdir=DIR temporary files in DIR [/tmp]], [ if test "$withval"; then tmpdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-tmpdir option.]) fi ]): ${tmpdir:="$deftmpdir"}tmpdir=`( eval echo "$tmpdir")`if test "$tmpdir" != "$deftmpdir" ; then SYSDEFINES="$SYSDEFINES"' -DTMPDIR=\"'"$tmpdir"'\"'fiAC_SUBST(SYSDEFINES)AC_ARG_WITH(utilslibdir, [ --with-utilslibdir=DIR server configuration files in DIR [prefix/lib]], [ if test "$withval"; then utilslibdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-utilslibdir option.]) fi ]): ${utilslibdir:='$prefix/lib'}utilslibdir=`( eval echo "$utilslibdir")`AC_SUBST(utilslibdir)AC_ARG_WITH(utilsincdir, [ --with-utilsincdir=DIR server configuration files in DIR [prefix/include]], [ if test "$withval"; then utilsincdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-utilsincdir option.]) fi ]): ${utilsincdir:='$prefix/include'}utilsincdir=`( eval echo "$utilsincdir")`AC_SUBST(utilsincdir)AC_ARG_WITH(utilsbindir, [ --with-utilsbindir=DIR server configuration files in DIR [prefix/bin]], [ if test "$withval"; then utilsbindir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-utilsbindir option.]) fi ]): ${utilsbindir:='$prefix/bin'}utilsbindir=`( eval echo "$utilsbindir")`AC_SUBST(utilsbindir)prefixext=yesAC_ARG_WITH(prefixext, [ --with-prefixext=YESNO extend prefix with /backup [yes]], [ if test "$withval"; then prefixext="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-prefixext option.]) fi ])subdir="/backup"if test $prefixext != "yes" ; then subdir=""fidnl *** server side ***AC_ARG_WITH(serverdir, [ --with-serverdir=DIR server installation in DIR [prefix/subdir/server]], [ if test "$withval"; then serverdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-serverdir option.]) fi ]): ${serverdir:='$prefix$subdir/server'}serverdir=`( eval echo "$serverdir")`AC_SUBST(serverdir)dnl *** serverbindirAC_ARG_WITH(serverbindir, [ --with-serverbindir=DIR server binaries in DIR [serverdir/bin]], [ if test "$withval"; then serverbindir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-serverbindir option.]) fi ]): ${serverbindir:='$serverdir/bin'}serverbindir=`( eval echo "$serverbindir")`AC_SUBST(serverbindir)dnl *** serverlibdirAC_ARG_WITH(serverlibdir, [ --with-serverlibdir=DIR server configuration files in DIR [serverdir/lib]], [ if test "$withval"; then serverlibdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-serverlibdir option.]) fi ]): ${serverlibdir:='$serverdir/lib'}serverlibdir=`( eval echo "$serverlibdir")`AC_SUBST(serverlibdir)dnl *** serverconfdirAC_ARG_WITH(serverconfdir, [ --with-serverconfdir=DIR server configuration files in DIR [serverdir/etc]], [ if test "$withval"; then serverconfdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-serverconfdir option.]) fi ]): ${serverconfdir:='$serverdir/etc'}serverconfdir=`( eval echo "$serverconfdir")`AC_SUBST(serverconfdir)dnl *** servervardirAC_ARG_WITH(servervardir, [ --with-servervardir=DIR variable server files in DIR [serverdir/var]], [ if test "$withval"; then servervardir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-servervardir option.]) fi ]): ${servervardir:='$serverdir/var'}servervardir=`( eval echo "$servervardir")`AC_SUBST(servervardir)dnl *** servermandirAC_ARG_WITH(servermandir, [ --with-servermandir=DIR variable server files in DIR [serverdir/man]], [ if test "$withval"; then servermandir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-servermandir option.]) fi ]): ${servermandir:='$serverdir/man'}servermandir=`( eval echo "$servermandir")`AC_SUBST(servermandir)dnl *** serverlogdirAC_ARG_WITH(serverlogdir, [ --with-serverlogdir=DIR server log files in DIR [serverdir/var]], [ if test "$withval"; then serverlogdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-serverlogdir option.]) fi ]): ${serverlogdir:='$serverdir/var'}serverlogdir=`( eval echo "$serverlogdir")`AC_SUBST(serverlogdir)dnl *** client side ***AC_ARG_WITH(clientdir, [ --with-clientdir=DIR client installation in DIR [prefix/subdir/client]], [ if test "$withval"; then clientdir="$withval" else AC_MSG_WARN([*** You must supply an argument to the --with-clientdir option.]) fi ]): ${clientdir:='$prefix$subdir/client'}clientdir=`( eval echo "$clientdir"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -