2009-05-13 12:41:38 -04:00
|
|
|
dnl $Id$
|
2006-01-07 15:14:23 -05:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
dnl AC_PREREQ(2.61)
|
2006-01-07 15:14:23 -05:00
|
|
|
|
|
|
|
dnl Sneaky way to get an Id tag into the configure script
|
|
|
|
AC_COPYRIGHT([$Id$])
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
AC_INIT([map65],[0.9])
|
2006-01-07 15:14:23 -05:00
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
fail=0
|
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
AC_PREFIX_DEFAULT(/usr/local/)
|
|
|
|
|
|
|
|
OLD_CFLAGS="$CFLAGS"
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_LANG(C)
|
|
|
|
AC_PROG_F77
|
|
|
|
|
|
|
|
dnl Make sure autoconf doesn't interfere with cflags -jmallett
|
|
|
|
CFLAGS="$OLD_CFLAGS"
|
|
|
|
|
2006-01-09 14:18:03 -05:00
|
|
|
dnl Lets guess at some likely places for extra libs/includes XXX -db
|
2009-04-23 15:02:43 -04:00
|
|
|
CPPFLAGS="-I/usr/local/include ${CPPFLAGS}"
|
2006-08-10 15:36:41 -04:00
|
|
|
LDFLAGS="-L/usr/local/lib ${LDFLAGS}"
|
|
|
|
LIBS=" -lpthread ${LIBS}"
|
2009-05-13 09:56:15 -04:00
|
|
|
FCV=""
|
|
|
|
FFLAGS_GFORTRAN="${FFLAGS} -fno-range-check -ffixed-line-length-none\
|
|
|
|
-Wall -fbounds-check -fno-second-underscore -fPIC"
|
|
|
|
FFLAGS_G95="${FFLAGS} -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC"
|
|
|
|
#-Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Pick up FC from the environment if present
|
|
|
|
dnl I'll add a test to confirm this is a gfortran later -db
|
|
|
|
dnl
|
2006-01-09 14:18:03 -05:00
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
if test -n ${FC} ; then
|
|
|
|
gfortran=${FC}
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([uname -s])
|
2006-01-07 15:14:23 -05:00
|
|
|
case `uname -s` in
|
|
|
|
CYGWIN*)
|
|
|
|
AC_MSG_RESULT(Cygwin)
|
|
|
|
CYGWIN=yes
|
|
|
|
;;
|
|
|
|
SunOS*)
|
|
|
|
AC_MSG_RESULT(SunOS or Solaris)
|
|
|
|
AC_DEFINE(__EXTENSIONS__, 1, [This is needed to use strtok_r on Solaris.])
|
|
|
|
;;
|
2009-05-13 09:56:15 -04:00
|
|
|
dnl
|
|
|
|
dnl Pick up current gfortran from ports infrastructure for fbsd
|
|
|
|
dnl
|
|
|
|
FreeBSD*)
|
|
|
|
if test -z ${gfortran} ; then
|
|
|
|
gfortran=`grep FC: /usr/ports/Mk/bsd.gcc.mk | head -1 |awk '{print $2}'`
|
|
|
|
fi
|
|
|
|
FCV_G95="g95"
|
|
|
|
;;
|
2006-01-07 15:14:23 -05:00
|
|
|
*)
|
2009-05-13 09:56:15 -04:00
|
|
|
FCV_G95="g95"
|
2006-01-07 15:14:23 -05:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
dnl
|
|
|
|
dnl look for gfortran if nothing else was given
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test -z $gfortran ; then
|
|
|
|
gfortran="gfortran"
|
|
|
|
fi
|
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
if test "$ac_cv_c_compiler_gnu" = yes; then
|
|
|
|
AC_MSG_CHECKING(if $CC is Apple GCC)
|
|
|
|
|
|
|
|
if expr "`$CC -v 2>&1 | tail -1`" : ".*Apple" >/dev/null; then
|
|
|
|
AppleGCC=yes
|
|
|
|
else
|
|
|
|
AppleGCC=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT($AppleGCC)
|
|
|
|
|
2006-01-09 21:43:23 -05:00
|
|
|
CFLAGS="$CFLAGS -Wall -O0"
|
2006-01-07 15:14:23 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl If we support -g, use it!
|
|
|
|
if test "$ac_cv_prog_cc_g" = yes; then
|
2006-01-09 21:43:23 -05:00
|
|
|
CFLAGS="$CFLAGS -g"
|
2006-01-07 15:14:23 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl jdc -- If CFLAGS is defined, best use it everywhere...
|
|
|
|
dnl NOTE: jv says it must be added to the *END*, because things like
|
|
|
|
dnl "gcc -O9 -O2" will result in -O2 getting preference. How stupid.
|
|
|
|
if test ! -z "$CFLAGS"; then
|
2006-01-09 21:43:23 -05:00
|
|
|
CFLAGS="$CFLAGS $CFLAGS"
|
2006-01-07 15:14:23 -05:00
|
|
|
fi
|
|
|
|
|
2006-01-07 20:40:30 -05:00
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PATH_PROG(RM, rm)
|
|
|
|
AC_PATH_PROG(CP, cp)
|
|
|
|
AC_PATH_PROG(MV, mv)
|
|
|
|
AC_PATH_PROG(LN, ln)
|
|
|
|
AC_PATH_PROG(SED, sed)
|
|
|
|
AC_PATH_PROG(AR, ar)
|
|
|
|
AC_PATH_PROG(LD, ld)
|
|
|
|
AC_PATH_PROG(TEST, [test], [test])
|
|
|
|
AC_PATH_PROG(PYTHON, python)
|
|
|
|
AC_PATH_PROG(F2PY, f2py)
|
2006-04-13 00:50:00 -04:00
|
|
|
AC_PATH_PROG(G95, g95)
|
2009-05-13 09:56:15 -04:00
|
|
|
AC_PATH_PROG(GFORTRAN, ${gfortran})
|
2006-01-07 16:24:49 -05:00
|
|
|
AC_MSG_CHECKING([OS])
|
|
|
|
OS=`uname`
|
|
|
|
AC_SUBST(OS, "${OS}")
|
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
dnl Checks for header files.
|
2006-01-15 21:07:25 -05:00
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2006-01-15 21:07:25 -05:00
|
|
|
AC_CHECK_HEADERS([inttypes.h stdint.h sys/resource.h sys/param.h errno.h \
|
|
|
|
sys/syslog.h stddef.h libgen.h sys/wait.h wait.h stdio.h termios.h \
|
|
|
|
sys/resource.h linux/ppdev.h dev/ppbus/ppi.h sys/stat.h fcntl.h sys/ioctl.h ])
|
|
|
|
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
AC_CHECK_HEADER([fftw3.h], [HAS_FFTW3_H=1], [HAS_FFTW3_H=0])
|
2006-01-10 11:36:04 -05:00
|
|
|
AC_CHECK_HEADER([samplerate.h], [HAS_SAMPLERATE_H=1], [HAS_SAMPLERATE_H=0])
|
2006-01-07 15:14:23 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
HAS_PORTAUDIO_H=0
|
|
|
|
HAS_PORTAUDIO_LIB=0
|
|
|
|
HAS_PORTAUDIO=0
|
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
dnl See whether we can include both string.h and strings.h.
|
|
|
|
AC_CACHE_CHECK([whether string.h and strings.h may both be included],
|
|
|
|
gcc_cv_header_string,
|
|
|
|
[
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[#include <string.h>
|
|
|
|
#include <strings.h>],
|
|
|
|
[gcc_cv_header_string=yes],
|
|
|
|
[gcc_cv_header_string=no])
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "$gcc_cv_header_string" = "yes"; then
|
|
|
|
AC_DEFINE(STRING_WITH_STRINGS, 1, [Define to 1 if string.h may be included along with strings.h])
|
|
|
|
fi
|
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
dnl check for a fortran shim entry point
|
|
|
|
AC_CHECK_LIB(fftw3f, sfftw_destroy_plan_, \
|
|
|
|
[HAS_FFTW3FLIBS=1], [HAS_FFTW3FLIBS=0])
|
2006-01-07 15:14:23 -05:00
|
|
|
|
2006-01-07 20:40:30 -05:00
|
|
|
dnl Check for stdarg.h - if we can't find it, halt configure
|
|
|
|
AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - wsjt will not compile without it **])])
|
2006-01-07 15:14:23 -05:00
|
|
|
|
|
|
|
dnl Debug-related options
|
|
|
|
dnl =====================
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(clobber,
|
|
|
|
AC_HELP_STRING([--enable-clobber], [Don't preserve old binaries on make install]),
|
|
|
|
[clobber=$enableval], [clobber=no])
|
|
|
|
|
|
|
|
if test "$clobber" = yes; then
|
|
|
|
AC_SUBST(CLOBBER, yes)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(assert,
|
|
|
|
AC_HELP_STRING([--enable-assert],[Enable assert().]),
|
|
|
|
[assert=$enableval], [assert=no])
|
|
|
|
|
|
|
|
if test "$assert" = no; then
|
|
|
|
AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$prefix" = "NONE"; then
|
2009-05-13 12:41:38 -04:00
|
|
|
prefix=${ac_default_prefix}
|
2006-01-07 15:14:23 -05:00
|
|
|
else
|
|
|
|
|
|
|
|
dnl Don't get bitten by Cygwin's stupidity if the user specified
|
|
|
|
dnl a custom prefix with a trailing slash
|
|
|
|
|
2009-05-13 12:41:38 -04:00
|
|
|
prefix=`echo ${ac_default_prefix} | sed 's/\/$//'`
|
2006-01-07 15:14:23 -05:00
|
|
|
fi
|
|
|
|
|
2006-04-13 00:50:00 -04:00
|
|
|
dnl pick gfortran or g95
|
|
|
|
dnl ====================
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(g95,
|
|
|
|
AC_HELP_STRING([--enable-g95],[Use G95 compiler if available.]),
|
|
|
|
[g95=$enableval], [g95=no])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(gfortran,
|
|
|
|
AC_HELP_STRING([--enable-gfortran],[Use gfortran compiler if available.]),
|
|
|
|
[gfortran=$enableval], [gfortran=no])
|
|
|
|
|
2006-01-10 16:35:37 -05:00
|
|
|
dnl now set conf.h,, CPPFLAGS and CFLAGS flags as needed
|
|
|
|
dnl ====================================================
|
|
|
|
|
2009-05-13 12:41:38 -04:00
|
|
|
if test "$g95" = yes; then
|
|
|
|
FC_LIB_PATH=${G95_LIB_PATH}
|
|
|
|
FC=${G95}
|
|
|
|
gfortran=no
|
|
|
|
elif test "$gfortran" = yes; then
|
|
|
|
FC_LIB_PATH=${GFORTRAN_LIB_PATH}
|
|
|
|
FC=${GFORTRAN}
|
|
|
|
g95=no
|
2009-05-13 09:56:15 -04:00
|
|
|
fi
|
|
|
|
|
2009-05-13 12:41:38 -04:00
|
|
|
if test -z $FC ; then
|
|
|
|
if test ! -z $GFORTRAN ; then
|
|
|
|
FC_LIB_PATH=${GFORTRAN_LIB_PATH}
|
|
|
|
FC=${GFORTRAN}
|
|
|
|
gfortran=yes
|
|
|
|
elif test ! -z $G95 ; then
|
|
|
|
FC_LIB_PATH=${G95_LIB_PATH}
|
|
|
|
FC=${G95}
|
|
|
|
g95=yes
|
2009-05-13 09:56:15 -04:00
|
|
|
fi
|
2006-04-13 00:50:00 -04:00
|
|
|
fi
|
2009-05-13 12:41:38 -04:00
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
dnl
|
|
|
|
dnl if FC is not set by now, pick a compiler for user
|
|
|
|
dnl
|
2006-04-13 00:50:00 -04:00
|
|
|
|
|
|
|
if test -z $FC ; then
|
|
|
|
if test ! -z $GFORTRAN ; then
|
2009-05-13 09:56:15 -04:00
|
|
|
if test "$g95" = yes; then
|
|
|
|
echo "You enabled g95, but no g95 compiler found, defaulting to gfortran instead"
|
|
|
|
fi
|
|
|
|
FC_LIB_PATH=`${GFORTRAN} -print-file-name=`
|
|
|
|
FC=`basename ${GFORTRAN}`
|
|
|
|
g95=no
|
2006-04-13 00:50:00 -04:00
|
|
|
gfortran=yes
|
2009-05-13 09:56:15 -04:00
|
|
|
FFLAGS="${FFLAGS} -fno-range-check -ffixed-line-length-none"
|
|
|
|
FCV="gnu95"
|
2006-04-13 00:50:00 -04:00
|
|
|
elif test ! -z $G95 ; then
|
2009-05-13 09:56:15 -04:00
|
|
|
if test "$gfortran" = yes; then
|
|
|
|
echo "You enabled gfortran, but no gfortran compiler found, defaulting to g95 instead"
|
|
|
|
fi
|
|
|
|
FC_LIB_PATH=`${G95} -print-file-name=`
|
|
|
|
FC=`basename ${G95}`
|
2006-04-13 00:50:00 -04:00
|
|
|
g95=yes
|
2009-05-13 09:56:15 -04:00
|
|
|
gfortran=no
|
|
|
|
FFLAGS="${FFLAGS} -ftrace=full -cpp"
|
|
|
|
FCV="g95"
|
2006-04-13 00:50:00 -04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(FC_LIB_PATH, "${FC_LIB_PATH}", [Path to fortran libs.])
|
|
|
|
AC_SUBST(FC_LIB_PATH, "${FC_LIB_PATH}")
|
|
|
|
AC_DEFINE_UNQUOTED(FC, "${FC}", [Fortran compiler.])
|
|
|
|
AC_SUBST(FC, "${FC}")
|
2009-05-13 12:41:38 -04:00
|
|
|
AC_SUBST(FCV, "${FCV}")
|
|
|
|
AC_SUBST(PREFIX, "${prefix}")
|
2006-04-13 00:50:00 -04:00
|
|
|
|
2006-01-10 16:35:37 -05:00
|
|
|
dnl set defaults
|
|
|
|
dnl ============
|
|
|
|
|
2006-08-10 20:00:23 -04:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
AC_MSG_CHECKING([for a v19 portaudio ])
|
2006-01-10 16:35:37 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
portaudio_lib_dir="/usr/lib"
|
|
|
|
portaudio_include_dir="/usr/include"
|
2006-01-07 20:40:30 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
AC_ARG_WITH([portaudio-include-dir],
|
|
|
|
AC_HELP_STRING([--with-portaudio-include-dir=<path>],
|
|
|
|
[path to portaudio include files]),
|
|
|
|
[portaudio_include_dir=$with_portaudio_include_dir])
|
2006-01-07 20:40:30 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
AC_ARG_WITH([portaudio-lib-dir],
|
|
|
|
AC_HELP_STRING([--with-portaudio-lib-dir=<path>],
|
|
|
|
[path to portaudio lib files]),
|
|
|
|
[portaudio_lib_dir=$with_portaudio_lib_dir])
|
2006-01-08 13:19:01 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test -e ${portaudio_include_dir}/portaudio.h; then
|
|
|
|
HAS_PORTAUDIO_H=1
|
2006-04-13 11:13:25 -04:00
|
|
|
fi
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test -e ${portaudio_lib_dir}/libportaudio.so \
|
|
|
|
-o -e ${portaudio_lib_dir}/libportaudio.a;then
|
|
|
|
HAS_PORTAUDIO_LIB=1
|
2006-01-07 20:40:30 -05:00
|
|
|
fi
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then
|
|
|
|
LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}"
|
|
|
|
LIBS="${LIBS} -lportaudio"
|
|
|
|
CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}"
|
|
|
|
AC_CHECK_LIB(portaudio, Pa_GetVersion, \
|
|
|
|
[HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0])
|
|
|
|
if test $HAS_PORTAUDIO_VERSION -eq 0; then
|
|
|
|
AC_MSG_RESULT([This is likely portaudio v18; you need portaudio v19])
|
|
|
|
else
|
|
|
|
HAS_PORTAUDIO=1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([portaudio not found trying FreeBSD paths ])
|
|
|
|
portaudio_lib_dir="/usr/local/lib/portaudio2"
|
|
|
|
portaudio_include_dir="/usr/local/include/portaudio2"
|
|
|
|
dnl
|
|
|
|
dnl Try again to make sure portaudio dirs are valid
|
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING([for a v19 portaudio in FreeBSD paths.])
|
|
|
|
HAS_PORTAUDIO_H=0
|
|
|
|
HAS_PORTAUDIO_LIB=0
|
2006-01-10 11:36:04 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test -e ${portaudio_include_dir}/portaudio.h; then
|
|
|
|
HAS_PORTAUDIO_H=1
|
|
|
|
fi
|
2006-01-10 11:36:04 -05:00
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test -e ${portaudio_lib_dir}/libportaudio.so \
|
|
|
|
-o -e ${portaudio_lib_dir}/libportaudio.a;then
|
|
|
|
HAS_PORTAUDIO_LIB=1
|
2006-01-07 20:40:30 -05:00
|
|
|
fi
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test $HAS_PORTAUDIO_H -eq 1 -a $HAS_PORTAUDIO_LIB -eq 1; then
|
|
|
|
AC_MSG_RESULT([found portaudio in FreeBSD paths, double checking it is v19 ])
|
|
|
|
LDFLAGS="-L${portaudio_lib_dir} ${LDFLAGS}"
|
|
|
|
LIBS="${LIBS} -lportaudio"
|
|
|
|
CPPFLAGS="-I${portaudio_include_dir} ${CPPFLAGS}"
|
|
|
|
AC_CHECK_LIB(portaudio, Pa_GetVersion, \
|
|
|
|
[HAS_PORTAUDIO_VERSION=1], [HAS_PORTAUDIO_VERSION=0])
|
|
|
|
if test $HAS_PORTAUDIO_VERSION -eq 0; then
|
|
|
|
AC_MSG_RESULT([How did you end up with a portaudio v18 here?])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([found v19])
|
|
|
|
HAS_PORTAUDIO=1
|
|
|
|
HAS_PORTAUDIO_H=1
|
|
|
|
fi
|
2006-01-07 20:40:30 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
dnl sanity tests.
|
|
|
|
dnl =============
|
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
if test -z $FC ; then
|
|
|
|
fail=1
|
|
|
|
echo "You need g95 or gfortran to compile this program!"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $HAS_FFTW3_H -eq 0; then
|
|
|
|
fail=1
|
|
|
|
echo "You need to install the fftw3 libraries"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $HAS_SAMPLERATE_H -eq 0; then
|
|
|
|
fail=1
|
|
|
|
echo "You need to install the samplerate library"
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAS_SAMPLERATE_H, 1, )
|
|
|
|
LIBS="${LIBS} -lsamplerate"
|
|
|
|
fi
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test $HAS_PORTAUDIO -eq 1; then
|
|
|
|
AC_DEFINE(HAS_PORTAUDIO, 1, )
|
|
|
|
AC_DEFINE(HAS_PORTAUDIO_H, 1, )
|
|
|
|
AC_DEFINE(HAS_PORTAUDIO_LIB, 1, )
|
|
|
|
else
|
|
|
|
fail=1
|
|
|
|
echo "This program needs portaudio v19 to compile."
|
|
|
|
echo "Please use --with-portaudio-include-dir= and"
|
|
|
|
echo " --with-portaudio-lib-dir= to set the paths."
|
2006-01-07 20:40:30 -05:00
|
|
|
fi
|
|
|
|
|
2009-05-13 09:56:15 -04:00
|
|
|
if test $HAS_FFTW3_H -eq 1; then
|
|
|
|
AC_DEFINE(HAS_FFTW3_H, 1, )
|
|
|
|
else
|
|
|
|
fail=1
|
|
|
|
echo "You are missing the fftw3.h include file"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $HAS_FFTW3FLIBS -eq 1; then
|
|
|
|
LIBS="${LIBS} -lfftw3f"
|
|
|
|
AC_DEFINE(HAS_FFTW3FLIBS, 1, )
|
|
|
|
else
|
|
|
|
fail =1
|
|
|
|
echo "You are missing the fortran shim libs in libfftw3."
|
|
|
|
fi
|
|
|
|
|
2006-02-20 15:46:33 -05:00
|
|
|
if test "$F2PY" = ""; then
|
2009-05-13 09:56:15 -04:00
|
|
|
echo "You are missing f2py, trying local copy."
|
|
|
|
F2PY="python f2py.py";
|
2006-02-20 15:46:33 -05:00
|
|
|
fi
|
2006-01-10 11:36:04 -05:00
|
|
|
|
2006-01-09 14:18:03 -05:00
|
|
|
dnl
|
2009-05-13 09:56:15 -04:00
|
|
|
dnl
|
|
|
|
dnl If fail a pre-requisite then fail
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test $fail -eq 1; then
|
|
|
|
AC_MSG_ERROR([Please check error messages and install missing packages.])
|
|
|
|
fi
|
|
|
|
|
2006-01-09 14:18:03 -05:00
|
|
|
AC_SUBST(CPPFLAGS, "${CPPFLAGS}")
|
|
|
|
AC_SUBST(LDFLAGS, "${LDFLAGS}")
|
2006-08-10 15:36:41 -04:00
|
|
|
AC_SUBST(LIBS, "${LIBS}")
|
2006-01-09 21:43:23 -05:00
|
|
|
AC_SUBST(CFLAGS)
|
2006-01-09 14:18:03 -05:00
|
|
|
|
2006-02-20 15:46:33 -05:00
|
|
|
AC_OUTPUT
|
2006-04-05 16:07:32 -04:00
|
|
|
dnl AC_CONFIG_FILES(Makefile)
|
2006-02-20 15:46:33 -05:00
|
|
|
|
2006-01-10 11:36:04 -05:00
|
|
|
dnl do summary
|
2006-01-07 15:14:23 -05:00
|
|
|
|
2006-01-10 16:35:37 -05:00
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
2009-04-23 15:02:43 -04:00
|
|
|
if test $g95 = "yes"; then
|
2006-04-13 00:50:00 -04:00
|
|
|
echo "Using g95 as fortran compiler.";
|
2009-05-13 09:56:15 -04:00
|
|
|
elif test $gfortran = "yes"; then
|
2006-04-13 00:50:00 -04:00
|
|
|
echo "Using gfortran as fortran compiler.";
|
|
|
|
fi
|
|
|
|
|
2006-01-07 15:14:23 -05:00
|
|
|
echo
|
|
|
|
echo "Compiling $PACKAGE_NAME $PACKAGE_VERSION"
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Installing into: $prefix"
|
|
|
|
|
|
|
|
echo
|