📄 configure.in
字号:
dnl This is an autoconf script.dnl To rebuild the `configure' script from this, execute the commanddnl autoconfdnl in the directory containing this script. You must have autoconfdnl version 1.4 or later.dnldnl The following text appears in the resulting `configure' script,dnl explaining how to rebuild it.[#!/bin/sh# Guess values for system-dependent variables and create Makefiles.# Generated automatically using autoconf.# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.# This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.#CONFIGURE_ARGS="$*"if test -n "$CONFIGURE_ARGS" ; then echo "Configuring with args $CONFIGURE_ARGS"fiprint_error() { echo "*# $*" 2>&1 ; }progname="`echo $0 | sed 's:^\./\./:\./:'`"usage_msg="Usage: ${progname} -p4arch=ARCH_TYPE [-alog={on,off}] [-dprintfl={on,off}] [-p4device=device] [-p4comm=shared] [-listener_pathname="\<pathname\>"] [-rsh=command] [-rshnol] [-cflags=flags] [-dlast] [-listenersig=name] [--enable-nonblockread] [--enable-threaded-listener] [--enable-lazy-gethostbyname ] [--enable-nonblocking-listener] [--enable-yield=method] [--disable-each of the options starting with enable]"RSHCOMMAND=MDEP_LIBS=MDEP_CFLAGS=MDEP_FFLAGS=MDEP_LFLAGS=OPTFLAGS="-g"USERCC=0CC=${CC:-cc}USERF77=0FC=${FC:-f77}threaded_listener=0userSet_threaded_listener=0enable_lazy_gethostbyname="no"enable_nonblocking_listener="yes"enable_yield=yeslistener_sig=""cross_compiling=0# use modern socket code (EOF on socket can be distinquished from no-data)# unless the test below fails. This can be turned off with# --disable-nonblockreaduse_nonblock_read=1#for argdo # Code from autoconf 2 to get any option after an = case "$arg" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esaccase $arg in -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; -libbuild_dir=*) libbuild_dir=`echo A$arg | sed 's/A[-a-z_]*=//'` ;; -p4arch=*) p4arch=`echo $arg|sed 's/-p4arch=//'` eval "p4arch_`echo $p4arch`=1" echo Setting p4arch to $p4arch ;; -p4device=*) p4device=`echo $arg|sed 's/-p4device=//'` eval "p4device_`echo $p4device`=1" echo Setting p4device to $p4device ;; -p4echo=*) p4echo=`echo $arg|sed 's/-p4echo=//'` echo $p4echo ;; -p4make=*) p4make=`echo $arg|sed 's/-p4make=//'` echo Setting p4make to $p4make ;; -alog=*) p4alog=`echo $arg|sed 's/-alog=//'` echo Setting p4alog to $p4alog ;; -p4comm=*) p4comm=`echo $arg|sed 's/-p4comm=//'` eval "p4comm_`echo $p4comm`=1" echo Setting p4comm to $p4comm ;; -dprintfl=*) p4dprintfl=`echo $arg|sed 's/-dprintfl=//'` echo Setting p4dprintfl to $p4dprintfl ;; -dlast) MDEP_CFLAGS="$MDEP_CFLAGS -DUSE_HOLD_LAST_DEBUG -DUSE_PRINT_LAST_ON_SIGINT -DUSE_PRINT_LAST_ON_ERROR" ;; -rsh=*) RSHCOMMAND=`echo A$arg|sed 's/A-rsh=//'` echo Setting RSHCOMMAND to $RSHCOMMAND ;; -rshnol) RSHNOL=1 ;; -cflags=*) USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`" ;; -listener_pathname=*) p4listener_pathname=`echo $arg|sed 's/-listener_pathname=//'` echo Setting p4listener_pathname to $p4listener_pathname ;; -listenersig=*) listener_sig=`echo A$arg|sed -e 's/A-listenersig=//g'` ;; -threaded_list*|-enable-threaded_list*|--enable-threaded-list*) threaded_listener=1 userSet_threaded_listener=1 ;; -nothreaded_list*|-disable-threaded_list*|--disable-threaded-list*) threaded_listener=0 userSet_threaded_listener=1 ;; -echo) set -x ;; -u | -usage) (echo "${usage_msg}") >& 2 exit 1 ;; -opt=* | --opt=*) package="`echo $arg|sed 's/-*opt=//'`" OPTFLAGS=$package ;; -cc=* | --cc=*) CC=`echo $arg|sed 's/-*cc=//'` USERCC=1 ;; -socksize=*|--socksize=*) SOCKSIZE="`echo $arg|sed 's/-*socksize=//'`" ;; -*enable-nonblockread) use_nonblock_read=1 ;; -*disable-nonblockread) use_nonblock_read=0 ;; -enable-g | --enable-g | --enable-g=* | -enable-g=* ) OPTFLAGS="$OPTFLAGS -g" ;; -disable-g | --disable-g ) ;; -enable-lazy-gethostbyname | --enable-lazy-gethostbyname ) # If enabled, gethostbyname is called only when needed for # a connection, rather than for all processes enable_lazy_gethostbyname="yes" ;; -disable-lazy-gethostbyname | --disable-lazy-gethostbyname ) enable_lazy_gethostbyname="no" ;; -enable-nonblocking-listener | --enable-nonblocking-listener ) enable_nonblocking_listener=yes ;; -disable-nonblocking-listener | --disable-nonblocking-listener ) enable_nonblocking_listener=no ;; -enable-yield|--enable-yield) if test -z "$ac_optarg" ; then ac_optarg=yes ; fi enable_yield=$ac_optarg ;; -disable-yield|--disable-yield) enable_yield=no ;; -*enable-*) # ignore unrecognized options : ;; -*disable-*) # ignore unrecognized options : ;; *) # Allow null args if test -n "$arg" ; then echo "Invalid p4 configure option $arg" (echo "${usage_msg}") >& 2 exit 1; fi ;;esacdoneif test -z "$p4arch" ; then echo "You must set a P4 architecture with -p4arch=name" exit 1fiP4ARCH="unknown"MAKE=makeCLINKER=$CCFLINKER=$FCAR="ar lruv"RM=/bin/rmP4_OBJ="\$(P4_COMM_OBJ) \$(P4_SOCK_OBJ) \$(P4_SHMEM_OBJ)"## date might include various quotes. Just to be safe, remove anything# other than letters, numbers, space, and colon.P4_CONFIGURED_TIME="`date | sed -e 's/[^a-zA-Z0-9: ]//g'`"DEFINE_ALOG="#undef ALOG_TRACE"DEFINE_SYSV_IPC="#undef SYSV_IPC"DEFINE_VENDOR_IPC="#undef VENDOR_IPC"DEFINE_P4_DPRINTFL="#define P4_DPRINTFL"LISTENER_PATHNAME=""]# It is important to remove the p4_config.h file if we are performing# a VPATH build (the include target is a link)rm -f config.log p4_config.h include/p4_config.hAC_PREPARE()# Check for valid optionsif test "$p4device" = "ch_p4mpd" -a "$p4comm" = "shared" ; then AC_MSG_ERROR([P4mpd does not support comm=shared])fi# Standard directoriesif test -z "$top_srcdir" -o "$top_srcdir" = "." ; then top_srcdir="$srcdir"fi# Remove the config file from the srcdir if this is a VPATH build.# (the include target is a link)rm -f "$top_srcdir/p4_config.h" "$top_srcdir/include/p4_config.h"AC_SUBST(top_srcdir)if test -z "$exec_prefix" ; then exec_prefix="${top_srcdir}"fiAC_SUBST(exec_prefix)if test -z "$libdir" ; then libdir="$exec_prefix/lib" ; fiAC_SUBST(libdir)# libbuild_dir is used to build the libraries in before they are installed.if test -z "$libbuild_dir" ; then libbuild_dir=`pwd`/libfiif test ! -d $libbuild_dir ; then if mkdir $libbuild_dir ; then : else print_error "Could not create directory $libbuild_dir" exit 1 fifiAC_SUBST(libbuild_dir)AC_PROG_RANLIB()# check for valid architecture# Check for an EXACT match, since that's what the defines requireegrep "^ $p4arch\$" $srcdir/MACHINES > /dev/null 2>&1if test $? != 0 ; then echo Invalid arch $p4arch exit 1fi# Now substitute the variablesif test -n "$p4make"; then MAKE=$p4makefi#if test -z "$VPATH" ; then PAC_MAKE_VPATHfi# Set the device (might be either ch_p4 or ch_p4mpd, for example)if test -n "$p4device"; then P4DEVICE=$p4devicefiif test "$P4DEVICE" = "ch_p4mpd" ; then AC_DEFINE(P4_WITH_MPD,,[Define for building p4 with the MPD device]) P4_OBJ="\$(P4_COMM_OBJ) \$(P4_SOCK_OBJ) \$(P4_SHMEM_OBJ) \$(P4_MPD_OBJ)"fiif test -n "$p4arch_SUN"; then P4ARCH=SUN if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# 486 running FreeBSDif test -n "$p4arch_FREEBSD"; then P4ARCH=FREEBSD if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# 486 running NetBSDif test -n "$p4arch_NETBSD"; then P4ARCH=NETBSD if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# x86 running Linuxif test -n "$p4arch_LINUX"; then P4ARCH=LINUX if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# Alpha running Linuxif test -n "$p4arch_LINUX_ALPHA"; then P4ARCH=LINUX if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# KSRif test -n "$p4arch_KSR"; then P4ARCH=KSR RANLIB=true AC_HAVE_LIBRARY(rpc)fi# Sun running Solarisif test -n "$p4arch_SUN_SOLARIS"; then # We've had so many problems with the threaded listener that we are # leaving the default as off. #if test $userSet_threaded_listener = 0 -a -z "$p4comm_shared" ; then # threaded_listener=1 #fi P4ARCH=SUN_SOLARIS AR="ar ruv" RANLIB=true # We might want to choose pthreads instead because of the listener.... if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" AC_HAVE_LIBRARY(thread) fi AC_HAVE_LIBRARY(socket) AC_HAVE_LIBRARY(nsl) AC_MSG_CHECKING(for how many arguments gettimeofday takes) AC_TEST_PROGRAM([#include <sys/time.h>main() {struct timeval tp;gettimeofday(&tp);return 0;}],MDEP_CFLAGS="$MDEP_CFLAGS -DUSE_WIERDGETTIMEOFDAY"AC_MSG_RESULT(one!),AC_MSG_RESULT(two - whew))dnl PAC_IS_GETTIMEOFDAY_OK(,MDEP_CFLAGS="$MDEP_CFLAGS -DUSE_WIERDGETTIMEOFDAY") dnl #MDEP_LIBS = /usr/ucblib/libucb.a -lsocket -lnsl # for fortranfi# Intel x86 running Solarisif test -n "$p4arch_I86_SOLARIS"; then P4ARCH=I86_SOLARIS AR="ar ruv" RANLIB=true if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" AC_HAVE_LIBRARY(thread) fi AC_HAVE_LIBRARY(socket)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -