?? configure.in
字號:
WILL_USE_SLANG="no" result=0 HAVE_SLANG=0fiAC_DEFINE_UNQUOTED(HAVE_SLANG, ${result}, [Whether S-Lang is installed.])## Electric Fence has to be last library linked.#AC_MSG_CHECKING(whether to link Electric Fence for memory debugging)if test "x$enable_efence" = "xyes"; then AC_MSG_RESULT(yes) AC_CHECK_LIB(efence, malloc, [LIBS="$LIBS -lefence"], [AC_MSG_ERROR(Unable to detect working Electric Fence installation)])else AC_MSG_RESULT(no)fi## USE_CHROMO_CHUNKS=1 produces a significant performance boost in many typical cases with the GNU gcc# compiler, but a slight performance penalty with the Intel C/C++ compiler.#USE_CHROMO_CHUNKS=0AC_DEFINE_UNQUOTED(USE_CHROMO_CHUNKS, ${USE_CHROMO_CHUNKS}, [Whether to use memory chunk handling for chromosomes.])GA_NUM_PROCESSES_ENVVAR_STRING="GA_NUM_PROCESSES"AC_DEFINE_UNQUOTED(GA_NUM_PROCESSES_ENVVAR_STRING, ${GA_NUM_PROCESSES_ENVVAR_STRING}, [Environment variable used to request processes.])GA_NUM_THREADS_ENVVAR_STRING="GA_NUM_THREADS"AC_DEFINE_UNQUOTED(GA_NUM_THREADS_ENVVAR_STRING, ${GA_NUM_THREADS_ENVVAR_STRING}, [Environment variable used to request threads.])AC_SUBST(GA_MAJOR_VERSION)AC_SUBST(GA_MINOR_VERSION)AC_SUBST(GA_LT_MINOR_VERSION)AC_SUBST(GA_PATCH_VERSION)AC_SUBST(GA_VERSION)AC_SUBST(GA_VERSION_STRING)AC_SUBST(MPIFLAGS)AC_SUBST(MPILIBS)AC_SUBST(GA_UNAME_STRING)AC_SUBST(GA_BUILD_DATE_STRING)AC_SUBST(V3_QUICK)AC_SUBST(W32_CRIPPLED)AC_SUBST(HAVE_SLANG)AC_SUBST(HAVE_MPI)AC_SUBST(HAVE_PTHREADS)AC_SUBST(USE_OPENMP)AC_SUBST(USE_CHROMO_CHUNKS)AC_SUBST(GA_NUM_PROCESSES_ENVVAR_STRING)AC_SUBST(MEMORY_ALLOC_DEBUG)AC_SUBST(MEMORY_ALLOC_SAFE)AC_SUBST(MEMORY_CHUNKS_MIMIC)## Compiler specific switches.#if test "x$enable_ccoptim" = "xyes"; then changequote(,)dnl case $CC in gcc) # Optimisations etc. for the GNU gcc compiler. case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac if test "x$enable_g" = "xyes"; then case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g" ;; esac case " $CFLAGS " in *[\ \ ]-O2[\ \ ]*) ;; *) CFLAGS="$CFLAGS -O2" ;; esac else case " $CFLAGS " in *[\ \ ]-O3[\ \ ]*) ;; *) CFLAGS="$CFLAGS -O3" ;; esac fi if test "x$enable_prof" = "xyes"; then case " $CFLAGS " in *[\ \ ]-pg[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pg" ;; esac fi if test "x$enable_missing_prototypes" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; esac fi if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi ;; icc)# Optimisations etc. for the Intel C++ compiler. case " $CFLAGS " in *[\ \ ]-w1[\ \ ]*) ;; *) CFLAGS="$CFLAGS -w2" ;; esac if test "x$enable_g" = "xyes"; then case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g" ;; esac case " $CFLAGS " in *[\ \ ]-O2[\ \ ]*) ;; *) CFLAGS="$CFLAGS -O2" ;; esac else case " $CFLAGS " in *[\ \ ]-O3[\ \ ]*) ;; *) CFLAGS="$CFLAGS -O3" ;; esac fi case " $CFLAGS " in *[\ \ ]-ipo[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ipo -ipo_obj" ;; esac if test "x$enable_openmp" = "xyes"; then case " $CFLAGS " in *[\ \ ]-openmp[\ \ ]*) ;; *) CFLAGS="$CFLAGS -openmp -openmp_report2" ;; esac fi if test "x$enable_parallel" = "xyes"; then case " $CFLAGS " in *[\ \ ]-parallel[\ \ ]*) ;; *) CFLAGS="$CFLAGS -parallel -parthreshold50 -par_report3" ;; esac fi if test "x$enable_prof" = "xyes"; then case " $CFLAGS " in *[\ \ ]-qp[\ \ ]*) ;; *) CFLAGS="$CFLAGS -qp" ;; esac fi if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac fi ;; ccc)# Kludges etc. for the Compaq C Compiler if test "x$enable_g" = "xyes"; then case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g3" ;; esac else case " $CFLAGS " in *[\ \ ]-O3[\ \ ]*) ;; *) CFLAGS="$CFLAGS -O3" ;; esac fi case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac case " $CFLAGS " in *[\ \ ]-misalign[\ \ ]*) ;; *) CFLAGS="$CFLAGS -misalign" ;; esac ;; pgcc)# The Portland Group C compiler.# Note: Should consider use of -tp flags to specify processor type.# I should also consider investigating the pgcc profiling options. if test "x$enable_g" = "xyes"; then case " $CFLAGS " in *[\ \ ]-g[\ \ ]*) ;; *) CFLAGS="$CFLAGS -g" ;; esac else case " $CFLAGS " in *[\ \ ]-fast[\ \ ]*) ;; *) CFLAGS="$CFLAGS -fast" ;; esac fi case " $CFLAGS " in *[\ \ ]-Xa[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Xa" ;; esac ;; *)# Could be any compiler!# Kludges etc. for the Sun C Compiler. if test "x$CC" = "xcc"; then if test "x$target" = "xsparc-sun-solaris2.8"; then if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac fi fi fi ;; esac changequote([,])dnlfi## Check type sizes.#AC_CHECK_SIZEOF(double, 4)AC_CHECK_SIZEOF(char, 1)AC_CHECK_SIZEOF(long, 4)AC_CHECK_SIZEOF(int, 4)AC_CHECK_SIZEOF(void *, 4)## Stuff.#AC_C_CONSTAC_STRUCT_TM## Checks for header files.#AC_HEADER_STDCAC_HEADER_TIMEAC_CHECK_HEADERS(pwd.h \ sys/select.h sys/signal.h \ sys/time.h sys/types.h sys/wait.h \ limits.h unistd.h \ string.h strings.h)## Check for some library functions which, if missing, we have replacements for.# NB/ Some further functions are checked below.#AC_CHECK_FUNCS(gethostname \ waitpid snooze \ memcpy memcmp \ min max \ index \ sincos \ strchr strcmp strcpy strpbrk strsep \ strcasecmp strncasecmp \ strdup strndup )## Some dodgy work-arounds.# Most of this is a bit kludgy. Proper fixes would be desirable...## Fix defines for case that the Sun Forte C compiler is being used on Solaris.if test "x$CC" = "xcc"; then# Compiler is possibly Sun's Forte C, so check platform. if test "x$target" = "xsparc-sun-solaris2.7"; then AC_DEFINE( SUN_FORTE_C, 2.7, [Define if using Sun's Forte C Compiler] ) AC_DEFINE( HAVE_BCOPY,1,[Whether bcopy() is available] ) # Big problems!!! AC_DEFINE( HAVE_BCMP,1,[Whether bcmp() is available] ) AC_DEFINE( HAVE_STRLEN,1,[Whether strlen() is available] ) AC_DEFINE( HAVE_STRNCMP,1,[Whether strncmp() is available] ) AC_DEFINE( HAVE_STRNCPY,1,[Whether strncpy() is available] ) AC_DEFINE( HAVE_MEMSET,1,[Whether memset() is available] ) AC_DEFINE( HAVE_USLEEP,1,[Whether usleep() is available] ) elif test "x$target" = "xsparc-sun-solaris2.8"; then AC_DEFINE( SUN_FORTE_C, 2.8, [Define if using Sun's Forte C Compiler] ) AC_CHECK_FUNCS(bcopy bcmp strlen strncmp strncpy memset usleep) else AC_DEFINE( SUN_FORTE_C, 0, [Define if using Sun's Forte C Compiler] ) AC_CHECK_FUNCS(bcopy bcmp strlen strncmp strncpy memset usleep) fielse# Don't recognise compiler as possibly being Sun's Forte C. AC_DEFINE( SUN_FORTE_C, 0, [Define if using Sun's Forte C Compiler] ) AC_CHECK_FUNCS(bcopy bcmp strlen strncmp strncpy memset usleep)fi## Some processor specific stuff.#AC_MSG_CHECKING(whether to apply processor specific optimisations)if test "x$enable_ccoptim" = "xyes"; then case "$target" in i586-*-*) AC_MSG_RESULT(yes - i586) case "$CC" in icc) case " $CFLAGS " in *[\ \ ]-tpp[1-9\ \ ]*) ;; # -axK *) CFLAGS="$CFLAGS -tpp6" ;; esac ;; gcc) case " $CFLAGS " in *[\ \ ]-mcpu=*) ;; *) CFLAGS="$CFLAGS -mcpu=pentium" ;; esac ;; esac ;; i686-*-*) AC_MSG_RESULT(yes - i686) case "$CC" in icc) case " $CFLAGS " in *[\ \ ]-tpp[1-9\ \ ]*) ;; # -axW *) CFLAGS="$CFLAGS -tpp7" ;; esac ;; gcc) case " $CFLAGS " in *[\ \ ]-mcpu=*) ;; *) CFLAGS="$CFLAGS -mcpu=pentiumpro" ;; esac ;; esac ;; *) AC_MSG_RESULT(no - none defined for ${target}) ;; esacelse AC_MSG_RESULT(no disabled)fidnl GAUL_MEMORY_ALIGN_SIZEdnl Determine memory alignment characteristics.AC_MSG_CHECKING(memory alignment)AC_CACHE_VAL(MEMORY_ALIGN_SIZE,[AC_TRY_RUN([#include <stdio.h>#include <stdlib.h>int main(void) { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", (unsigned int) sizeof(long)>sizeof(void *)?sizeof(long):sizeof(void *)); exit(0); }], MEM_ALIGN_SIZE=`cat conftestval`, MEM_ALIGN_SIZE=4, MEM_ALIGN_SIZE=8)])AC_MSG_RESULT(${MEM_ALIGN_SIZE})AC_DEFINE_UNQUOTED(MEMORY_ALIGN_SIZE, ${MEM_ALIGN_SIZE}, [Memory alignment boundry characteristics.])dnl GAUL_GNUMAKE_WARNdnl Produce warning message if non-GNU make is detected.temp=`make -version -f \dev\null 2>&1 | grep GNU`if test "x$temp" = "x"; then AC_MSG_WARN([You are advised to use GNU Make when compiling GAUL])fidnl GAUL_DETECT_BOOLdnl Determine native boolean stuff.dnl 1) Check whether stdbool.h defines bool and true/false correctly.dnl 2) Check whether compiler has built-in _Bool type.AC_CACHE_CHECK([for working stdbool.h], gaul_header_stdbool_h, [AC_TRY_COMPILE([#include <stdbool.h>], [bool blah = false;], gaul_header_stdbool_h="yes", gaul_header_stdbool_h="no")])if test "x$gaul_header_stdbool_h" = "xyes"; then AC_DEFINE(HAVE_STDBOOL_H, 1, [Define if you have a working <stdbool.h> header file.])fiAC_CACHE_CHECK([for built-in _Bool type], gaul__bool,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -