⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 XMDS is a code generator that integrates equations. You write them down in human readable form in a
💻 IN
📖 第 1 页 / 共 2 页
字号:
dnl Process this file with autoconf to produce a configure script.dnl   Copyright (C) 2000-2004dnl dnl   Code contributed by Greg Collecutt, Joseph Hope and Paul Cochranednl dnl   This file is part of xmds.dnl  dnl   This program is free software; you can redistribute it and/ordnl   modify it under the terms of the GNU General Public Licensednl   as published by the Free Software Foundation; either version 2dnl   of the License, or (at your option) any later version.dnl dnl   This program 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 thednl   GNU General Public License for more details.dnl dnl   You should have received a copy of the GNU General Public Licensednl   along with this program; if not, write to the Free Softwarednl   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.dnldnl $Id: configure.in,v 1.52 2004/10/25 06:02:41 joehope Exp $ dnlAC_INIT(source/main.cc)AM_INIT_AUTOMAKE(xmds, 1.4)AM_CONFIG_HEADER(source/config.h)AC_SUBST([PACKAGE],[xmds])AC_SUBST([VERSION],[1.4-1])AC_DEFINE([RELEASE],["1"],[Release number of package])AC_SUBST([RELEASE],["1"])dnl Pieces of this file have been copied from the fftw-2.1.5 configure.in filednl Ok, now grab the arguments, if anydnl FFTW stuffAC_ARG_WITH([fftw-path],	    [  --with-fftw-path         Set the path to the prefix of your fftw distribution],	    [FFTW_PATH="$withval"],[FFTW_PATH=""])dnl Is this a user installation?AC_ARG_WITH([user],	    [  --with-user              Install XMDS into user's bin directory],	    [bindir="$HOME"/bin	    includedir="$HOME"/bin            libdir="$HOME"/bin            mandir="$HOME"/man            USER_LIB="$HOME"/bin	    USER_INCLUDE="$HOME"/bin	    echo "XMDS will be installed into $bindir"],	    [USER_INCLUDE="."            USER_LIB="."])dnl Just in case --prefix is used, handle the possibilityif test "$prefix" != "NONE"then	USER_INCLUDE="$prefix"	USER_LIB="$prefix"	bindir="$prefix"	includedir="$prefix"	libdir="$prefix"	mandir="$prefix"fidnl Do we need extral libs passed to check for mpi? (eg -llam)AC_ARG_WITH([mpi-libs],	    [  --with-mpi-libs          Extra libraries needed when checking for MPI],	    [MPI_LIBS="$withval"],[MPI_LIBS="$MPI_LIBS"])dnl Add a path to mpi if necessaryAC_ARG_WITH([mpi-path],	    [  --with-mpi-path          Set the path to the prefix of your mpi distribution],	    [MPI_PATH="$withval" PATH="$PATH:$withval/bin"],[MPI_PATH="$MPI_PATH"])dnl Choose your mpi C compiler if necessaryAC_ARG_WITH([mpi-compiler],            [  --with-mpi-compiler      Set the mpi C compiler])dnl Enable mpi?AC_ARG_ENABLE([mpi],            [  --enable-mpi               If you want to use mpi, then set this flag])dnl Enable threads?AC_ARG_ENABLE([threads],            [  --enable-threads           If you want to use threads, then set this flag])dnl These settings are from an Intel white paper comparing gcc and iccAGGRESSIVE_GCC_CFLAGS=" -O3 -ffast-math -funroll-all-loops -fomit-frame-pointer"AGGRESSIVE_ICC_CFLAGS=" -O3 -tpp7 -ipo -ipo_obj"dnl Use native cc if presentAC_MSG_CHECKING([for vendor's cc to be used instead of gcc])AC_CHECK_PROG([CC], [cc], [cc])dnl Use native cxx if presentAC_MSG_CHECKING([for vendor's cxx to be used instead of gcc])AC_CHECK_PROG([CXX], [cxx], [cxx])dnl Checks for programs.AC_PROG_CXXAC_PROG_CCAC_ISC_POSIXdnl Check for icc, and if exists, use for compiling xmds output codeAC_CHECK_PROG([ICC],[icc],[icc])dnl Check for some handy programsAC_PROG_INSTALLAC_PROG_LN_SAC_PROG_RANLIBXMDS_INCLUDES="-I$USER_INCLUDE"dnl I need to process command line options just in case fftw isdnl in nonstandard locationif test "x$FFTW_PATH" != "x" then    FFTW_LIB_PATH="-L$FFTW_PATH/lib/"    FFTW_INCLUDE_PATH="$FFTW_PATH/include/"    XMDS_INCLUDES="$XMDS_INCLUDES -I$FFTW_INCLUDE_PATH"fidnl I need to process command line options just in case mpi isdnl in a nonstandard locationif test "x$MPI_PATH" != "x" then    MPI_LIB_PATH="-L$MPI_PATH/lib/"    MPI_INCLUDE_PATH="-I$MPI_PATH/include/"    XMDS_INCLUDES="$XMDS_INCLUDES $MPI_INCLUDE_PATH"fidnl Checks for libraries.AC_CHECK_LIB([m], [sqrt])AC_CHECK_LIB([stdc++],[cout])dnl Checks for header files.AC_HEADER_STDC#   Can't have this one when mpicc and cc are mixed non-gnu/gnu#if test "x$CC" = xgcc#then#	CFLAGS="$CFLAGS -Wall -pedantic"#	CXXFLAGS="$CXXFLAGS -Wall -pedantic -ansi"#fidnl Checks for library functions.AC_FUNC_ALLOCA          dnl if --enable-threads is set, then check for threads librariesif test x"$enable_threads" = xyesthen dnl Check for threads library... 	   	  # POSIX threads, the default choice: 	  if test -z "$THREADLIBS"; then 	          sinclude(acx_pthread.m4) 	          ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS " 	                  CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 	                  CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" 	                  tempXMDS_CFLAGS="$PTHREAD_CFLAGS" 	                  tempMPICCFLAGS="$PTHREAD_CFLAGS" 	                  CC="$PTHREAD_CC" 	                  AC_DEFINE([XMDS_USING_POSIX_THREADS],[],[Define for posix threads])]) 	  fi 	  # Solaris threads: 	  if test -z "$THREADLIBS"; then 	          AC_CHECK_LIB(thread, thr_create, 	                  [THREADLIBS="-lthread" 	                  AC_DEFINE([XMDS_USING_SOLARIS_THREADS],[],[Define for solaris threads])]) 	  fi 	  # Mach C threads: 	  if test -z "$THREADLIBS"; then 	          AC_CHECK_FUNC(cthread_fork, 	                  [THREADLIBS=" " 	                  AC_DEFINE([XMDS_USING_MACH_THREADS],[],[Define for mach threads])]) 	          AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) 	  fi 	  if test -z "$THREADLIBS"; then 	          AC_CHECK_LIB(cthread, cthread_fork, 	                  [THREADLIBS="-lcthread" 	                  AC_DEFINE([XMDS_USING_MACH_THREADS],[],[Define for mach threads])]) 	          AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) 	  fi 	  if test -z "$THREADLIBS"; then 	          AC_CHECK_LIB(cthreads, cthread_fork, 	                  [THREADLIBS="-lcthreads" 	                  AC_DEFINE([XMDS_USING_MACH_THREADS],[],[Define for mach threads])]) 	          AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) 	  fi 	  # BeOS threads: 	  if test -z "$THREADLIBS"; then 	          AC_CHECK_FUNC(spawn_thread, 	                  [THREADLIBS=" " 	                  AC_DEFINE([XMDS_USING_BEOS_THREADS],[],[Define for beos threads])]) 	  fi 	  if test -z "$THREADLIBS"; then 	          AC_MSG_ERROR(couldn't find threads library) 	  fi 	   	  AC_SUBST(THREADLIBS)# end enable_threads testfi### This code included from libsndfile configure.ac.# Determine endian-ness of target processor.AC_C_FIND_ENDIANAC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},        [Target processor is big endian.])AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},        [Target processor is little endian.])dnl We need to make sure that fftw exits, and that it is the right versionif test "x$FFTW_PATH" = "x"thenAC_CHECK_HEADERS(["$FFTW_INCLUDE_PATH"fftw.h],[],	    [echo "Eeek!  I can't find fftw.h!";            echo "It doesn't look like you'll be able to use fftw";            echo "Are you sure that --with-fftw-path is set correctly?"])elseAC_CHECK_FILE(["$FFTW_INCLUDE_PATH"fftw.h],[],            [echo "Eeek!  I can't find fftw.h!";            echo "It doesn't look like you'll be able to use fftw";            echo "Are you sure that --with-fftw-path is set correctly?"])fiAC_CHECK_LIB([fftw],     [fftw_create_plan],    [FFTW_LIBS="-lfftw"],    [echo "Bummer!  fftw doesn't seem to work";    echo "You need fftw to use xmds properly.";    echo "Please download from http://www.fftw.org";    echo "install it, and try configuring xmds again";    exit],    ["$FFTW_LIB_PATH"])# if threads are enabled, check to see if fftw_threads is availableif test x"$enable_threads" = xyesthen  if test "x$FFTW_PATH" = "x"  then	  AC_CHECK_HEADERS(["$FFTW_INCLUDE_PATH"fftw_threads.h],[],	    [echo "Eeek!  I can't find fftw_threads.h!";            echo "It doesn't look like you'll be able to use fftw_threads";            echo "Continuing anyway"])  else  AC_CHECK_FILE(["$FFTW_INCLUDE_PATH"fftw_threads.h],[],	    [echo "Eeek!  I can't find fftw_threads.h!";            echo "It doesn't look like you'll be able to use fftw_threads";            echo "Continuing anyway"])  fi  AC_CHECK_LIB([fftw_threads], [fftw_threads_init],	    [THREADLIBS="-lfftw_threads $THREADLIBS $FFTW_LIB_PATH";             FFTW_THREADS="-lfftw_threads"],	    [echo "Eeek!  fftw_threads doesn't seem to work";            echo "It doesn't look like you'll be able to use fftw_threads";            echo "Perhaps you need to use --enable-threads in fftw??";            echo "Continuing anyway"],	    ["$FFTW_LIB_PATH" "$FFTW_LIBS" "$THREADLIBS"])# end enable_threads checkfiif test x"$enable_mpi" = xyes

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -