📄 configure.in
字号:
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 #MDEP_LIBS = /usr/ucblib/libucb.a -lsocket -lnsl # for fortran fi# HP workstationif test -n "$p4arch_HP"; then P4ARCH=HP RANLIB=true # See if we need V3 for sighold AC_FUNC_CHECK(sighold,sighold_in_libc=yes,sighold_in_libc=no) if test $sighold_in_libc = "no" ; then # See if it is in V3 save_LIBS="$LIBS" LIBS="$LIBS -lV3" AC_FUNC_CHECK(sighold,sighold_in_libV3=yes,sighold_in_libV3=no) if test $sighold_in_libV3 = yes ; then # Call have_library just to force configure to add it to the # right places AC_HAVE_LIBRARY(V3) else AC_MSG_ERROR([HP currently requires the System V Release 3 libraries (libV3.a)]) fi fi # nsl is required in HPUX 11 for the xdr routines AC_HAVE_LIBRARY(nsl) AC_HAVE_LIBRARY(U77) # -lV3 is for sighold, etc. MDEP_FFLAGS="+U77 +T" if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# DEC Alpha workstation# Possibly also Compaq OSF1 alphaif test -n "$p4arch_ALPHA"; then P4ARCH=ALPHA if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# CRAYif test -n "$p4arch_CRAY"; then P4ARCH=CRAY AR='ar ruv' if test $USERCC = 0 ; then CC=cc ; fi if test $USERF77 = 0 ; then FC=cf77 ; fi CLINKER=$CC FLINKER=$FC RANLIB=truefi# PARAGONIP (Paragon w. Sockets)# We use ALPHA for P4ARCH because the alpha and paragon both use OSF/1if test -n "$p4arch_PARAGONIP"; then P4ARCH=ALPHA AC_HAVE_LIBRARY(rpc) AR='ar860 r' if test $USERCC = 0 ; then CC=icc ; fi if test $USERF77 = 0 ; then FC=if77 ; fi CLINKER=$CC FLINKER=$FC RANLIB=truefi# NeXT workstationif test -n "$p4arch_NEXT"; then P4ARCH=NEXT MDEP_CFLAGS="" # Black hardware, with NeXTstep #MDEP_CFLAGS="-arch i386" # for 486's running NeXTstep #MDEP_CFLAGS="-arch m68k -arch i386" # fat binaries, for bothfi# DEC 5000 workstationif test -n "$p4arch_DEC5000"; then P4ARCH=DEC5000 if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# RS6000 workstationif test -n "$p4arch_RS6000"; then# if test $userSet_threaded_listener = 0 -a -z "$p4comm_shared" ; then# threaded_listener=1# fi P4ARCH=RS6000 FC=xlf FLINKER=xlf RANLIB=true AC_HAVE_LIBRARY(bsd) MDEP_CFLAGS=-D_ALL_SOURCE if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# SP using TCPif test -n "$p4arch_SP1"; then P4ARCH=SP1 FC=xlf FLINKER=xlf RANLIB=true AC_HAVE_LIBRARY(bsd) if test -n "$p4comm_shared"; then DEFINE_SYSV_IPC="#define SYSV_IPC" fifi# SP with MPLif test -n "$p4arch_SP1_EUI"; then P4ARCH=SP1_EUI if test $USERCC = 0 ; then CC=mpcc ; fi if test $USERF77 = 0 ; then FC=mpxlf ; fi FLINKER=$FC CLINKER=$CC RANLIB=true AC_HAVE_LIBRARY(bsd) MDEP_CFLAGS = -I/usr/lpp/poe/includefi# SP with EUIH (obsolete)if test -n "$p4arch_SP1_EUI"; then P4ARCH=SP1_EUIH if test $USERCC = 0 ; then CC=cc ; fi if test $USERF77 = 0 ; then FC=xlf ; fi FLINKER="xlf -bimport:/usr/lpp/euih/eui/eui.exp" CLINKER="xlc -bimport:/usr/lpp/euih/eui/eui.exp -e main" RANLIB=true AC_HAVE_LIBRARY(bsd) MDEP_CFLAGS=-D_ALL_SOURCEfi# SGI workstationsif test -n "$p4arch_SGI"; then P4ARCH=SGI RANLIB=true # Look for getpwnam. If not found, try to find it in -lsun AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi dnl MDEP_CFLAGS=-cckr if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# temporary until complete SGI fixup: accept SGI5 as valid arch# SGI workstations with IRIX 5if test -n "$p4arch_SGI5"; then P4ARCH=SGI RANLIB=true AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi dnl MDEP_CFLAGS=-cckr if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi## Force 32-bit objectsif test -n "$p4arch_SGI32"; then P4ARCH=SGI RANLIB=true AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi # This choice of flags is for the SGI compilers. If the user chose # gcc, they won't work. PAC_CHECK_COMPILER_OPTION(-32,MDEP_CFLAGS="-32";MDEP_LFLAGS="-32") PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174"]) MDEP_FFLAGS="-32" # -woff 1552,1174" if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi## Force 32-bit objects (other way)if test -n "$p4arch_SGIN32"; then P4ARCH=SGI RANLIB=true AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi # This choice of flags is for the SGI compilers. If the user chose # gcc, they won't work. PAC_CHECK_COMPILER_OPTION(-n32,MDEP_CFLAGS="-n32";MDEP_LFLAGS="-n32") PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174"]) MDEP_FFLAGS="-n32" # -woff 1552,1174" if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# SGI workstations, IRIX 6if test -n "$p4arch_SGI6"; then P4ARCH=SGI RANLIB=true AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi dnl MDEP_CFLAGS="-cckr -woff 1552,1174" dnl MDEP_FFLAGS="-cckr -woff 1552,1174" PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174"]) MDEP_FFLAGS="" # "-woff 1552,1174" AC_HAVE_FUNCS(setsid) AC_HAVE_FUNCS(isatty)dnl A C_DEFINE(SET_NEW_PGRP) if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# SGI multiprocessors, like Onyxif test -n "$p4arch_SGI_MP"; then P4ARCH=SGI_MP RANLIB=true AC_FUNC_CHECK(getpwnam,has_getpwnam=1,has_getpwnam=0) if test $has_getpwnam = 0 ; then AC_HAVE_LIBRARY(sun) fi AC_HAVE_FUNCS(setsid) AC_HAVE_FUNCS(isatty) dnl MDEP_CFLAGS=-cckr if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# SGI Challenge Seriesif test -n "$p4arch_SGI_CH"; then P4ARCH=SGI_CH RANLIB=true AC_HAVE_FUNCS(setsid) AC_HAVE_FUNCS(isatty) dnl MDEP_CFLAGS="-cckr -64 -mips3 -woff 1552,1174" # -non_shared dnl MDEP_FFLAGS="-cckr -64 -mips3 -woff 1552,1174" # -non_shared PAC_CHECK_COMPILER_OPTION(-64,MDEP_CFLAGS="-64";MDEP_LFLAGS="-64") PAC_CHECK_COMPILER_OPTION(-mips3,MDEP_CFLAGS="$MDEP_CFLAGS -mips3") PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174"]) dnl MDEP_CFLAGS="-64 -mips3 -woff 1552,1174" # -non_shared MDEP_FFLAGS="-64 -mips3" # -woff 1552,1174" # -non_shared if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# SGI Challenge Seriesif test -n "$p4arch_SGI_CH32"; then P4ARCH=SGI_CH RANLIB=true AC_HAVE_FUNCS(setsid) AC_HAVE_FUNCS(isatty) PAC_CHECK_COMPILER_OPTION(-n32,MDEP_CFLAGS="-n32";MDEP_LFLAGS="-n32") PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174]") MDEP_FFLAGS="-n32" # -woff 1552,1174" if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# SGI Power Challenge Seriesif test -n "$p4arch_SGI_CH64"; then P4ARCH=SGI_CH64 RANLIB=true dnl MDEP_CFLAGS="-cckr -64 -mips4 -woff 1552,1174"# -non_shared dnl MDEP_FFLAGS="-cckr -64 -mips4 -woff 1552,1174"# -non_shared PAC_CHECK_COMPILER_OPTION(-64,MDEP_CFLAGS="-64";MDEP_LFLAGS="-64") PAC_CHECK_COMPILER_OPTION(-mips4,MDEP_CFLAGS="$MDEP_CFLAGS -mips4") PAC_CHECK_COMPILER_OPTION([-woff 1552,1174], [MDEP_CFLAGS="$MDEP_CFLAGS -woff 1552,1174]") MDEP_FFLAGS="-64 -mips4" # -woff 1552,1174" AC_HAVE_FUNCS(setsid) AC_HAVE_FUNCS(isatty) if test -n "$p4comm_shared"; then DEFINE_VENDOR_IPC="#define VENDOR_IPC" fifi# UXPM (MPIS chip)if test -n "$p4arch_UXPM"; then # Make it think that it is an IRIX v5 SGI P4ARCH=SGI RANLIB=true LIBS="$LIBS -lsocket -lnsl" MDEP_CFLAGS="-DNEEDS_NETINET"fi# UXPV (Fujitsu VX,VPP300,VPP700)if test -n "$p4arch_UXPV"; then # Make it think that it is an IRIX v5 SGI P4ARCH=SGI RANLIB=true LIBS="$LIBS -lsocket -lnsl" MDEP_CFLAGS="-DNEEDS_NETINET"fi# Symmetry with Dynixif test -n "$p4arch_SYMMETRY"; then P4ARCH=SYMMETRY FILE_LINK=ln FC=fortran CLINKER="cc -Z1000000" FLINKER="fortran -Z1000000" LIBS="$LIBS -lpps -lseq" MDEP_CFLAGS= MDEP_FFLAGS=fi# Symmetry with PTXif test -n "$p4arch_SYMMETRY_PTX"; then P4ARCH=SYMMETRY_PTX FILE_LINK=ln FC=fortran FLINKER=fortran RANLIB=true LIBS="$LIBS -lpps -lseq -lrpc -lsocket -linet -lnsl" MDEP_CFLAGS="-Wc,-seq"fi## dump copy of MDEP_CFLAGS into file for other system to pick up/bin/rm -f mpdepcflagsecho $MDEP_CFLAGS > mdepcflags# evaluate variables for p4_config.hif test "$p4alog" = "on"; then DEFINE_ALOG="#define ALOG_TRACE"fiif test "$p4dprintfl" = "off"; then DEFINE_P4_DPRINTFL="#undef P4_DPRINTFL"fiif test -n "$p4listener_pathname"; then LISTENER_PATHNAME="$p4listener_pathname"fi## Check for cross-compilation.AC_CROSS_CHECK()## We must check for the threaded listener early because it selects # POSIX source, which can change the results of the tests for headers and # features.#if test $threaded_listener = 1 ; then # Try to find a thread package has_pthread=0 PAC_CHECK_HEADER(pthread.h,[AC_DEFINE(HAVE_PTHREAD_H) has_pthread=1]) if test $has_pthread = 1 ; then has_pthread=0 AC_HAVE_LIBRARY(pthread,has_pthread=1) if test $has_pthread = 1 ; then # Could also check for pthread_create AC_DEFINE(THREAD_LISTENER) AC_DEFINE(USE_PTHREADS) # We need this to ensure that things like errno are thread safe. AC_DEFINE(_POSIX_C_SOURCE,199506L) AC_DEFINE(_POSIX_SOURCE) # In order to use XDR, we may also need to define __EXTENSIONS__ # or other awful things. # __EXTENSIONS__ is needed for Solaris AC_DEFINE(__EXTENSIONS__) if test -n "$p4arch_LINUX"; then # terrible hack for now: enable other features that we # expect on a LINUX platform AC_DEFINE(_SVID_SOURCE) AC_DEFINE(_BSD_SOURCE) fi LIBS="$LIBS -lpthread" echo "Using threaded listener" fi fifi## Look for netinet/in.h and sys/socketvar.hhas_rpc_rpc=0PAC_CHECK_HEADERS(rpc/rpc.h,has_rpc_rpc=1)has_netinet_in=0PAC_CHECK_HEADERS(netinet/in.h,has_netinet_in=1)PAC_CHECK_HEADERS(arpa/inet.h)PAC_CHECK_HEADERS(sys/socketvar.h)PAC_CHECK_HEADERS(stdlib.h)PAC_CHECK_HEADERS(unistd.h)PAC_CHECK_HEADERS(string.h)PAC_CHECK_HEADERS(strings.h)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -