📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.dnl Process this file with autoconf to produce a configure script.AC_INIT(funwaveC.c)FUNWAVEC_MAJOR_VERSION="0"FUNWAVEC_MINOR_VERSION="1"FUNWAVEC_MICRO_VERSION="4"AC_SUBST(FUNWAVEC_MAJOR_VERSION)AC_SUBST(FUNWAVEC_MINOR_VERSION)AC_SUBST(FUNWAVEC_MICRO_VERSION)dnl Check for the debug optionAC_ARG_ENABLE(debug, [--enable-debug compile with debugging stuff turned on], edebug=$enableval, edebug=no)AC_ARG_ENABLE(debug2, [--enable-debug2 compile with extra-debugging stuff turned on], edebug2=$enableval, edebug2=no)DE_ROTATION="0"TH_YES="1"DE_BUG2="0"if test "$edebug" = "yes"; then echo "Compiling w/ debugging & no threads" TH_YES="0"fiif test "$edebug2" = "yes"; then echo "Compiling w/ debugging level2" TH_YES="0" DE_BUG2="1"fi#if test "$erotation" = "yes"; then# echo "Compiling w/ rotation in mean flow dynamics"# DE_ROTATION="1"#fiAC_SUBST(TH_YES)AC_SUBST(DE_BUG2)AC_CANONICAL_HOSTdnl Checks for programs - basically the C compilerAC_PROG_MAKE_SETAC_PROG_CCdnl Checks for libraries.dnl Replace `main' with a function in -lfftw:dnl Check for threads libraryTHREADLIBS="no"AC_MSG_CHECKING(for pthread functions in standard libraries)AC_TRY_LINK(, [pthread_create();],AC_MSG_RESULT(yes);THREADLIBS="",AC_MSG_RESULT(no))if test "$THREADLIBS" = ""; then AC_MSG_CHECKING(if that definition really works) AC_TRY_RUN([int main() { return !pthread_equal(pthread_self(), pthread_self());}], AC_MSG_RESULT(yes);THREADLIBS="", AC_MSG_RESULT(no);THREADLIBS="no", AC_MSG_RESULT(crosscompiling so no);THREADLIBS="no")fiif test "$THREADLIBS" = "no"; then for lib in pthread c_r dce pthreads; do AC_CHECK_LIB($lib,pthread_create,THREADLIBS="-l$lib") if test $THREADLIBS != "no"; then break fi donefi if test "$THREADLIBS" = "no"; then AC_CHECK_FUNCS(pthread_create,THREADLIBS="")fiif test "$THREADLIBS" = "no"; then AC_MSG_ERROR(Your system doesn't seem to support posix threads. funwaveC will not work) exitfidnl Checks for programs.AC_CHECK_PROG(CC,cc,cc)AC_PROG_CCAC_PROG_CPPdnl Checks for libraries.dnl Replace `main' with a function in -lfftw:AC_CHECK_LIB(fftw3, main)dnl Replace `main' with a function in -libs:dnl Replace `main' with a function in -lm:AC_CHECK_LIB(m, main)dnl Replace `main' with a function in -lrfftw:#AC_CHECK_LIB(rfftw, main)dnl Check for glib, gtk, and gtkextra libraries# Find the GTK+ include and library directories.AM_PATH_GTK(1.2.0)AC_CHECK_LIB(signal, main)AC_CHECK_LIB(ieeefp, main)dnl Check for threads library#AC_CHECK_LIB(pthread, main)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(strings.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTif test "$edebug" = "yes"; thencase "${host}" ini?86*) CFLAGS=" -g " LFLAGS=" " CC="gcc" echo "Setting compilation for GNU/Linux with debugging ";;powerpc-apple*) CFLAGS=" -g " LFLAGS=" " CC="gcc" echo "Setting compilation for gcc/OSX with debugging ";;sparc-sun-solaris*) CFLAGS="-g -xCC" LFLAGS=" " CC="cc" echo "Compiling for Sun Solaris Sparc with debugging";;*hp-hpux*) CFLAGS=" -g" LFLAGS=" " CC="cc" echo "Setting compilation for HP Unix with debugging";;*) CFLAGS=" -g" LFLAGS=" -lpthread" echo "** Setting compilation for debug on an unfamiliar system, using defaults. This may not compile. ";;esacelsecase "${host}" inx86_64*) CFLAGS=" -O3" LFLAGS=" -lpthread" CC="gcc" echo "Setting compilation for GNU/Linux x86_64";;i?86*) CFLAGS=" -O3" LFLAGS=" -lpthread" CC="gcc" echo "Setting compilation for GNU/Linux ";;powerpc-apple*) CFLAGS=" -fast" LFLAGS=" -lpthread" CC="gcc" echo "Setting compilation for GNU/OS X ";;sparc-sun-solaris*) CFLAGS="-xO5 -xCC -native -fast" CC="cc" LFLAGS="-lpthread" echo "Setting compilation for Sun Solaris Sparc";;*hp-hpux*) CFLAGS=" -Ae +O3 +Oall" LFLAGS=" -lpthread" CC="cc" echo "Setting compilation for HP Unix";;*) CFLAGS=" -O" LFLAGS=" -lpthread" echo "** Setting compilation for an unfamiliar system, using defaults. This may not compile. ";;esacfiAC_SUBST(CFLAGS)AC_SUBST(LFLAGS)AC_SUBST(CC)AC_OUTPUT(funwaveC_config.h Makefile)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -