AC_INIT(src/huti_cg.src) dnl AC_PREREQ(2.59c) AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(hutiter, 4.0.1) sinclude(acx_elmer.m4) ACX_DEBUG AC_PROG_CC([xlc pathcc icc cc gcc]) AC_PROG_FC([xlf90 pathf90 ifort f90 g95]) AC_PROG_F77([xlf pathf90 ifort f77 g77]) AC_STDC_HEADERS AM_MAINTAINER_MODE AC_PROG_RANLIB dnl It is important to do this before *_WRAPPERS, because the ldflags might be different for 32 and 64 bits ACX_CHECK_B64FLAGS AC_F77_WRAPPERS AC_FC_WRAPPERS dnl case "$ac_cv_fc_mangling" in dnl "upper case, no underscore, no extra underscore" | \ dnl "upper case, no underscores") dnl AC_DEFINE(LINKTYP, 2, "Mangling: upper case, no underscore, no extra underscore") ;; dnl "lower case, no underscore, no extra underscore" | \ dnl "lower case, no underscores" ) dnl AC_DEFINE(LINKTYP, 3, "Mangling: lower case, no underscore, no extra underscore") ;; dnl "lower case, underscore, no extra underscore" | \ dnl "lower case, single underscores") dnl AC_DEFINE(LINKTYP, 1, "Mangling: lower case, underscore, no extra underscore") ;; dnl "lower case, underscore, extra underscore" | \ dnl "lower case, double underscores") dnl AC_DEFINE(LINKTYP, 1, "Mangling: lower case, underscore, extra underscore") ;; dnl *) dnl AC_MSG_ERROR([Unknown sort of Fortran name mangling. You compiler is most likely not worthy of existence, all attempts to use is are futile.]) ;; dnl esac LIBS="-L. $LIBS -L$prefix/lib" CFLAGS="$CFLAGS -I$prefix/include" CXXFLAGS="$CXXFLAGS -I$prefix/include" FCFLAGS="$FCFLAGS -I. -I$prefix/include" ACX_LANG_COMPILER_MS AM_CONDITIONAL(USING_MS_C_COMPILER, test "$acx_cv_c_compiler_ms" = "yes") sinclude(acx_blas.m4) sinclude(acx_lapack.m4) dnl through in obsolete fortran runtime if found. otherwise hope for the best. (netlib blas and lapack might need this) AC_CHECK_LIB(g2c, e_wsfe) ACX_BLAS([], [AC_MSG_ERROR([BLAS was not found!])]) dnl ACX_LAPACK([], [AC_MSG_ERROR([LAPACK was not found!])]) LIBS="$BLAS_LIBS $LIBS $FCLIBS $FLIBS" dnl aix xl* compiler family needs some help with preprocessing case "$FC" in *xlf*) FCFLAGS="$FCFLAGS -qsuffix=cpp=F90" ;; esac # there are a lot of function pointers declared (without __stdcall) wrong in the # *.c files. This kludge fixes them for now. if test "$acx_cv_c_compiler_ms" = "yes"; then CFLAGS="$CFLAGS -Gz" fi AC_CONFIG_HEADER(config.h) AC_SUBST(AM_FCFLAGS) AC_SUBST(FCFLAGS) AC_OUTPUT([ Makefile include/Makefile examples/Makefile examples/ex1/Makefile src/Makefile])