Skip to content
Snippets Groups Projects
Commit e9689a58 authored by oawile's avatar oawile
Browse files

- updated build system to check for fftw3 now

- added options and checks available in ppmcore autoconf


git-svn-id: https://ppm.inf.ethz.ch/svn/ppmnumerics/branches/ngtopo/libppmnumerics@845 7c7fe9aa-52eb-4d9e-b0a8-ba7d787348e9
parent 641ea597
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
builddir = .
LIBS = -lppm -lppm
LIBS = -lfftw3 -lppm -lppm
LDFLAGS = -L/home/omar/sw/metis/intel/lib -L../../ppmcore/libppm/lib -L../../ppmcore/libppm/lib
CFLAGS = -O3
FCLIBS = -L/home/omar/sw/metis/intel/lib -L/opt/openmpi/1.5/intel/lib -L/opt/openmpi/1.5/intel/lib/ -L/opt/intel/composerxe-2011.0.084/compiler/lib/intel64 -L/opt/intel/composerxe-2011.0.084/ipp/../compiler/lib/intel64 -L/opt/intel/composerxe-2011.0.084/ipp/lib/intel64 -L/opt/intel/composerxe-2011.0.084/mkl/lib/intel64 -L/opt/intel/composerxe-2011.0.084/tbb/lib/intel64//cc4.1.0_libc2.4_kernel2.6.16.21 -L/opt/openmpi/1.5/intel/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib64 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib -L/lib/../lib64 -L/lib/../lib -L/usr/lib/../lib64 -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../.. -L/lib64 -L/lib -L/usr/lib64 -L/usr/lib -L/usr/lib/x86_64-linux-gnu -lmpi_f90 -lmpi_f77 -lmpi -ldl -lnsl -lutil -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s
......
......@@ -11,7 +11,6 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_include([m4/ax_compiler_vendor.m4])
m4_include([m4/ax_f90_header.m4])
m4_include([m4/ax_f90_internal_headmod.m4])
m4_include([m4/ax_f90_library.m4])
......
This diff is collapsed.
This diff is collapsed.
# This file was generated by Autom4te Tue Dec 22 07:01:21 UTC 2009.
# This file was generated by Autom4te Thu Aug 5 21:29:16 UTC 2010.
# It contains the lists of macros which have been traced.
# It can be safely removed.
......@@ -11,7 +11,7 @@
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'm4/ax_compiler_vendor.m4',
'/usr/share/aclocal/ax_compiler_vendor.m4',
'm4/ax_f90_header.m4',
'm4/ax_f90_internal_headmod.m4',
'm4/ax_f90_library.m4',
......@@ -112,18 +112,34 @@
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'm4/ax_f90_header.m4',
'm4/ax_f90_internal_headmod.m4',
'm4/ax_f90_library.m4',
'm4/ax_f90_library_setup.m4',
'm4/ax_f90_module.m4',
'm4/ax_f90_module_extension.m4',
'm4/ax_f90_module_flag.m4',
'm4/ppm_check_mpi.m4',
'configure.ac'
],
{
'm4_pattern_forbid' => 1,
'include' => 1,
'PPM_CHECK_MPI' => 1,
'AC_DEFUN' => 1,
'm4_include' => 1,
'm4_pattern_allow' => 1,
'AX_F90_MODULE_EXTENSION' => 1,
'AX_F90_LIBRARY_SETUP' => 1,
'AX_F90_HEADER' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'm4_pattern_forbid' => 1,
'm4_pattern_allow' => 1,
'AX_F90_INTERNAL_HEADMOD' => 1,
'AC_DEFUN_ONCE' => 1,
'AX_F90_LIBRARY' => 1,
'm4_include' => 1,
'AX_F90_MODULE' => 1,
'_m4_warn' => 1,
'include' => 1,
'AU_DEFUN' => 1,
'AC_DEFUN_ONCE' => 1
'AX_F90_MODULE_FLAG' => 1
}
], 'Autom4te::Request' )
);
......
m4trace:m4/ax_compiler_vendor.m4:49: -1- AC_DEFUN([AX_COMPILER_VENDOR], [
m4trace:/usr/share/aclocal/ax_compiler_vendor.m4:47: -1- AC_DEFUN([AX_COMPILER_VENDOR], [
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
......@@ -440,43 +440,43 @@ m4trace:configure.ac:61: -1- AX_F90_MODULE_FLAG
m4trace:configure.ac:62: -1- m4_pattern_allow([^ax_cv_f90_modflag$])
m4trace:configure.ac:84: -1- AX_COMPILER_VENDOR
m4trace:configure.ac:92: -1- m4_pattern_allow([^HAVE_LIBM$])
m4trace:configure.ac:98: -1- AX_F90_MODULE_EXTENSION
m4trace:configure.ac:103: -1- AX_F90_LIBRARY_SETUP([ppm], [], [ppm_module_finalize.$ax_cv_f90_modext], [libppm*], [
m4trace:configure.ac:114: -1- AX_F90_MODULE_EXTENSION
m4trace:configure.ac:119: -1- AX_F90_LIBRARY_SETUP([ppm], [], [ppm_module_finalize.$ax_cv_f90_modext], [libppm*], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
])
m4trace:configure.ac:103: -1- AX_F90_HEADER([ppm], [], [
m4trace:configure.ac:119: -1- AX_F90_HEADER([ppm], [], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
], [$withval], [
FCFLAGS="$FCFLAGS $AS_TR_SH(F90_HEADER_ppm)"
], [])
m4trace:configure.ac:103: -1- AX_F90_INTERNAL_HEADMOD([ppm fortran 90 header], [], [-I], [
m4trace:configure.ac:119: -1- AX_F90_INTERNAL_HEADMOD([ppm fortran 90 header], [], [-I], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
], [F90_HEADER_ppm], [$withval], [
FCFLAGS="$FCFLAGS $AS_TR_SH(F90_HEADER_ppm)"
], [])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_HEADER_ppm$])
m4trace:configure.ac:103: -1- AX_F90_MODULE([ppm], [ppm_module_finalize.$ax_cv_f90_modext], [
m4trace:configure.ac:119: -1- m4_pattern_allow([^F90_HEADER_ppm$])
m4trace:configure.ac:119: -1- AX_F90_MODULE([ppm], [ppm_module_finalize.$ax_cv_f90_modext], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
], [$withval], [
FCFLAGS="$FCFLAGS $AS_TR_SH(F90_MODULE_ppm)"
], [])
m4trace:configure.ac:103: -1- AX_F90_INTERNAL_HEADMOD([ppm fortran 90 module], [ppm_module_finalize.$ax_cv_f90_modext], ["$ax_cv_f90_modflag"], [
m4trace:configure.ac:119: -1- AX_F90_INTERNAL_HEADMOD([ppm fortran 90 module], [ppm_module_finalize.$ax_cv_f90_modext], ["$ax_cv_f90_modflag"], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
], [F90_MODULE_ppm], [$withval], [
FCFLAGS="$FCFLAGS $AS_TR_SH(F90_MODULE_ppm)"
], [])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_MODULE_ppm$])
m4trace:configure.ac:103: -1- AX_F90_LIBRARY([ppm], [libppm*], [
m4trace:configure.ac:119: -1- m4_pattern_allow([^F90_MODULE_ppm$])
m4trace:configure.ac:119: -1- AX_F90_LIBRARY([ppm], [libppm*], [
use ppm_module_finalize
integer :: info
call ppm_finalize(info)
......@@ -484,8 +484,14 @@ m4trace:configure.ac:103: -1- AX_F90_LIBRARY([ppm], [libppm*], [
LDFLAGS="$LDFLAGS $AS_TR_SH(F90_LDFLAGS_ppm)"
LIBS="$AS_TR_SH(F90_LIBS_ppm) $LIBS"
], [AC_MSG_ERROR([cannot compile ppm numerics without ppm core])])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_LDFLAGS_ppm$])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_LIBS_ppm$])
m4trace:configure.ac:162: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:169: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:169: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:119: -1- m4_pattern_allow([^F90_LDFLAGS_ppm$])
m4trace:configure.ac:119: -1- m4_pattern_allow([^F90_LIBS_ppm$])
m4trace:configure.ac:132: -1- m4_pattern_allow([^HAVE_LIBFFTW3$])
m4trace:configure.ac:183: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:185: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:187: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:197: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:199: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:201: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:207: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:207: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:aclocal.m4:14: -1- m4_include([m4/ax_compiler_vendor.m4])
m4trace:aclocal.m4:15: -1- m4_include([m4/ax_f90_header.m4])
m4trace:aclocal.m4:16: -1- m4_include([m4/ax_f90_internal_headmod.m4])
m4trace:aclocal.m4:17: -1- m4_include([m4/ax_f90_library.m4])
m4trace:aclocal.m4:18: -1- m4_include([m4/ax_f90_library_setup.m4])
m4trace:aclocal.m4:19: -1- m4_include([m4/ax_f90_module.m4])
m4trace:aclocal.m4:20: -1- m4_include([m4/ax_f90_module_extension.m4])
m4trace:aclocal.m4:21: -1- m4_include([m4/ax_f90_module_flag.m4])
m4trace:aclocal.m4:22: -1- m4_include([m4/ppm_check_mpi.m4])
m4trace:aclocal.m4:14: -1- m4_include([m4/ax_f90_header.m4])
m4trace:aclocal.m4:15: -1- m4_include([m4/ax_f90_internal_headmod.m4])
m4trace:aclocal.m4:16: -1- m4_include([m4/ax_f90_library.m4])
m4trace:aclocal.m4:17: -1- m4_include([m4/ax_f90_library_setup.m4])
m4trace:aclocal.m4:18: -1- m4_include([m4/ax_f90_module.m4])
m4trace:aclocal.m4:19: -1- m4_include([m4/ax_f90_module_extension.m4])
m4trace:aclocal.m4:20: -1- m4_include([m4/ax_f90_module_flag.m4])
m4trace:aclocal.m4:21: -1- m4_include([m4/ppm_check_mpi.m4])
m4trace:configure.ac:21: -1- m4_pattern_allow([AS_TR_SH])
m4trace:configure.ac:23: -1- AC_INIT([PPM], [1.1.9])
m4trace:configure.ac:23: -1- m4_pattern_forbid([^_?A[CHUM]_])
......@@ -366,38 +365,57 @@ m4trace:configure.ac:59: -1- AH_OUTPUT([SIZEOF_LONG_DOUBLE], [/* The size of `lo
m4trace:configure.ac:62: -1- AC_SUBST([ax_cv_f90_modflag])
m4trace:configure.ac:62: -1- AC_SUBST_TRACE([ax_cv_f90_modflag])
m4trace:configure.ac:62: -1- m4_pattern_allow([^ax_cv_f90_modflag$])
m4trace:configure.ac:92: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */
m4trace:configure.ac:106: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */
@%:@undef HAVE_LIBM])
m4trace:configure.ac:92: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM])
m4trace:configure.ac:92: -1- m4_pattern_allow([^HAVE_LIBM$])
m4trace:configure.ac:103: -1- AC_SUBST([F90_HEADER_ppm])
m4trace:configure.ac:103: -1- AC_SUBST_TRACE([F90_HEADER_ppm])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_HEADER_ppm$])
m4trace:configure.ac:103: -1- AC_SUBST([F90_MODULE_ppm])
m4trace:configure.ac:103: -1- AC_SUBST_TRACE([F90_MODULE_ppm])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_MODULE_ppm$])
m4trace:configure.ac:103: -1- AC_SUBST([F90_LDFLAGS_ppm])
m4trace:configure.ac:103: -1- AC_SUBST_TRACE([F90_LDFLAGS_ppm])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_LDFLAGS_ppm$])
m4trace:configure.ac:103: -1- AC_SUBST([F90_LIBS_ppm])
m4trace:configure.ac:103: -1- AC_SUBST_TRACE([F90_LIBS_ppm])
m4trace:configure.ac:103: -1- m4_pattern_allow([^F90_LIBS_ppm$])
m4trace:configure.ac:162: -1- AC_SUBST([DEBUG], [-O0])
m4trace:configure.ac:162: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:162: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:168: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.ac:169: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:169: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:169: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:169: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:169: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.ac:106: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM])
m4trace:configure.ac:106: -1- m4_pattern_allow([^HAVE_LIBM$])
m4trace:configure.ac:114: -1- AC_SUBST([F90_HEADER_ppm])
m4trace:configure.ac:114: -1- AC_SUBST_TRACE([F90_HEADER_ppm])
m4trace:configure.ac:114: -1- m4_pattern_allow([^F90_HEADER_ppm$])
m4trace:configure.ac:114: -1- AC_SUBST([F90_MODULE_ppm])
m4trace:configure.ac:114: -1- AC_SUBST_TRACE([F90_MODULE_ppm])
m4trace:configure.ac:114: -1- m4_pattern_allow([^F90_MODULE_ppm$])
m4trace:configure.ac:114: -1- AC_SUBST([F90_LDFLAGS_ppm])
m4trace:configure.ac:114: -1- AC_SUBST_TRACE([F90_LDFLAGS_ppm])
m4trace:configure.ac:114: -1- m4_pattern_allow([^F90_LDFLAGS_ppm$])
m4trace:configure.ac:114: -1- AC_SUBST([F90_LIBS_ppm])
m4trace:configure.ac:114: -1- AC_SUBST_TRACE([F90_LIBS_ppm])
m4trace:configure.ac:114: -1- m4_pattern_allow([^F90_LIBS_ppm$])
m4trace:configure.ac:123: -1- AH_OUTPUT([HAVE_LIBFFTW3], [/* Define to 1 if you have the `fftw3\' library (-lfftw3). */
@%:@undef HAVE_LIBFFTW3])
m4trace:configure.ac:123: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFFTW3])
m4trace:configure.ac:123: -1- m4_pattern_allow([^HAVE_LIBFFTW3$])
m4trace:configure.ac:173: -1- AC_SUBST([DEBUG], ["-g -O1 -check pointers -check bounds -traceback"])
m4trace:configure.ac:173: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:173: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:175: -1- AC_SUBST([DEBUG], ["-g -O0 -fbounds-check -fbacktrace"])
m4trace:configure.ac:175: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:175: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:177: -1- AC_SUBST([DEBUG], ["-g"])
m4trace:configure.ac:177: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:177: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:187: -1- AC_SUBST([DEBUG], ["-O1 -g -debug all -check all -fp-stack-check -heap-arrays -ftrapuv -check pointers -check bounds -traceback"])
m4trace:configure.ac:187: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:187: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:189: -1- AC_SUBST([DEBUG], ["-O0 -g -fbounds-check -fbacktrace -ftrapv -fno-automatic"])
m4trace:configure.ac:189: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:189: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:191: -1- AC_SUBST([DEBUG], ["-O1 -g"])
m4trace:configure.ac:191: -1- AC_SUBST_TRACE([DEBUG])
m4trace:configure.ac:191: -1- m4_pattern_allow([^DEBUG$])
m4trace:configure.ac:196: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.ac:197: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:197: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:197: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:197: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:197: -1- AC_SUBST_TRACE([abs_top_builddir])
This diff is collapsed.
......@@ -78,23 +78,34 @@ if test "x${use_mpi}" == xyes; then
AC_LANG([C])
fi
# for now let's use the C compiler to check the vendor we're using here
# this of course means that we HAVE to set all compiler flags to compilers of
# the same vendor (which is anyway a good idea)
AX_COMPILER_VENDOR
# Checks for libraries and set preprocessing flags
# Checks for libraries and set preprocessing flags
# Make sure that the libraries are compiled with Fortran
AC_LANG([Fortran])
# Check the compiler vendor.. this list should be extended of course
# but let's hope that this will work in most cases
AC_MSG_CHECKING([your Fortran compiler vendor])
vendor=none
for vendorkp in gnu:gfortran intel:Intel sun:Sun portland:Portland; do
str=`echo $vendorkp | cut -d: -f2`
if `$FC -V 2>&1 | grep -q $str`; then
vendor=`echo $vendorkp | cut -d: -f1`;
AC_MSG_RESULT([$vendor])
break;
fi;
done
if test "x${vendor}" = xnone; then
AC_MSG_RESULT([unknown])
fi;
# this test should be omitted if the compiler is intel, they provide their own
# math implementation
if test "x${ax_cv_c_compiler_vendor}" != xintel; then
if test "x${vendor}" != xintel; then
AC_CHECK_LIB([m],[sqrt])
fi
# Make sure that the libraries are compiled with Fortran
AC_LANG([Fortran])
AX_F90_MODULE_EXTENSION
if test x$ax_cv_f90_modext = xunknown ; then
AC_MSG_ERROR([unable to find f90 modules extension])
......@@ -106,25 +117,20 @@ AX_F90_LIBRARY_SETUP(ppm,[],ppm_module_finalize.$ax_cv_f90_modext,libppm*,[
call ppm_finalize(info)
])
# Check to see if fftw3 was enabled with -enable-fftw3
#use_fftw3=no
#AC_ARG_ENABLE([fftw3],,[use_fftw3=yes])
# If it was enabled than check that the library exists
#if test "x${use_fftw3}" = xyes; then
# have_fftw=no
# AC_CHECK_LIB([fftw3],[dfftw_execute])
# AC_SEARCH_LIBS([dfftw_execute],[fftw3],[have_fftw=yes])
# if test "x${have_fftw}" = xno; then
# echo "------------------------------------------"
# echo " You are trying to use FFTW to build PPM. "
# echo " Either the library is missing or incorrectly compiled/linked."
# echo " It can be downloaded at: http://www.fftw.org/download.html"
# echo "------------------------------------------"
# (exit 1); exit 1;
# fi
# echo "#define __FFTW" >> ./src/ppm_define.h
#fi
# check for fftw3
have_fftw=no
AC_CHECK_LIB([fftw3],[dfftw_execute])
AC_SEARCH_LIBS([dfftw_execute],[fftw3],[have_fftw=yes])
if test "x${have_fftw}" = xno; then
echo "------------------------------------------"
echo " You are trying to use FFTW to build PPM. "
echo " Either the library is missing or incorrectly compiled/linked."
echo " It can be downloaded at: http://www.fftw.org/download.html"
echo "------------------------------------------"
(exit 1); exit 1;
fi
echo "#define __FFTW" >> ./src/ppm_define.h
# Check to see if linux was enabled with -enable-linux
AC_ARG_ENABLE([linux],[AS_HELP_STRING([--enable-linux],
......@@ -159,10 +165,32 @@ AC_ARG_ENABLE([no-microinstr],[AS_HELP_STRING([--enable-no-microinstr],
[enable __NOMICROINSTRUCTIONS (default is no)])],
[echo "#define __NOMICROINSTRUCTIONS" >> ./src/ppm_define.h])
AC_ARG_ENABLE([debug],[AS_HELP_STRING([--enable-debug],
[enable debug mode (default is no)])],
[AC_SUBST(DEBUG,-O0)])
dev_compile=no
AC_ARG_ENABLE([dev],[AS_HELP_STRING([--enable-dev],
[enable development mode (default is no)])],[dev_compile=yes])
if test "x${dev_compile}" = xyes; then
if test "x${vendor}" == xintel; then
AC_SUBST(DEBUG,["-g -O1 -check pointers -check bounds -traceback"])
elif test "x${vendor}" == xgnu; then
AC_SUBST(DEBUG,["-g -O0 -fbounds-check -fbacktrace"])
else
AC_SUBST(DEBUG,["-g"])
fi
fi
debug_compile=no
AC_ARG_ENABLE([debug],[AS_HELP_STRING([--enable-debug],
[enable debug mode (default is no)])],[debug_compile=yes])
if test "x${debug_compile}" = xyes; then
echo "#define __DEBUG" >> ./src/ppm_define.h
if test "x${vendor}" == xintel; then
AC_SUBST(DEBUG,["-O1 -g -debug all -check all -fp-stack-check -heap-arrays -ftrapuv -check pointers -check bounds -traceback"])
elif test "x${vendor}" == xgnu; then
AC_SUBST(DEBUG,["-O0 -g -fbounds-check -fbacktrace -ftrapv -fno-automatic"])
else
AC_SUBST(DEBUG,["-O1 -g"])
fi
fi
# Generate Makefiles
AC_CONFIG_FILES([Makefile])
......
# ===========================================================================
# http://www.nongnu.org/autoconf-archive/ax_compiler_vendor.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPILER_VENDOR
#
# DESCRIPTION
#
# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
# watcom, etc. The vendor is returned in the cache variable
# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2008 Matteo Frigo
#
# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 7
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])
#define __MPI
#define __FFTW
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment