1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(lib/mainprint.cpp)
3
AM_CONFIG_HEADER(config.h)
5
AM_INIT_AUTOMAKE(libofa, "$VERSION")
11
case "${host_cpu}-${host_os}" in
12
*-beos*) os=beos; LIBS='-lbe -lroot' ;;
13
*-cygwin*) os=cygwin ;;
14
*-freebsd*) os=freebsd ;;
15
*-darwin*) os=darwin ;;
17
*-netbsd*) os=netbsd ;;
18
*-openbsd*) os=openbsd ;;
20
*-solaris*) os=solaris; LIBS='-lsocket -lnsl' ;;
21
*-qnx*) os=qnx; LIBS='-lsocket' ;;
22
*) AC_MSG_RESULT([WARNING: unknown system]) ;;
24
AM_CONDITIONAL(DARWIN, test x$os = xdarwin)
25
AM_CONDITIONAL(FREEBSD, test x$os = xfreebsd)
27
dnl Checks for programs.
31
AC_LIBLTDL_CONVENIENCE
33
AC_SUBST(LIBTOOL_DEPS)
41
if test "$GCC" = yes; then
42
dnlCFLAGS="$CFLAGS -Wall -O2"
43
CFLAGS="$CFLAGS -Wall -g"
45
if test "$GXX" = yes; then
46
CXXFLAGS="$CXXFLAGS -Wall -g"
49
dnl Checks for libraries.
52
AC_CHECK_LIB(expat, XML_ExpatVersion,
53
[EXPAT_LIBS="-lexpat"], [
55
echo "* expat is needed to build this library. It is either not"
56
echo "* installed on your system or it is too old."
57
echo "* Please download it from http://expat.sourceforge.net."
59
AC_MSG_ERROR("Cannot build. Stop.")], -lexpat)
63
AC_CHECK_LIB(curl, curl_global_init,
64
[CURL_LIBS="-lcurl"], [
66
echo "* libcurl is needed to build this library. It is either not"
67
echo "* installed on your system or it is too old."
68
echo "* Please download it http://curl.haxx.se/"
70
AC_MSG_ERROR("Cannot build. Stop.")], -lcurl)
73
dnl Support libfftw2 and vSDP and MKL (intel)
74
dnl FFTW for FFTW v2. FFTW3 for FFTW v3. VDSP for vDSP. MKL for MKL
75
dnl TODO: PREANSI for win32
77
if test x$os = xdarwin; then
78
AC_MSG_NOTICE([Using vDSP on OS X])
79
LIBS="$LIBS -framework Accelerate"
80
FFT_WRAPPER="fftlibvdsp_op.cpp"
81
AM_CONDITIONAL(FFTW3, false)
82
AM_CONDITIONAL(VDSP, true)
83
AC_DEFINE_UNQUOTED(VDSP, 1, Use vDSP)
85
AC_MSG_NOTICE([Using libfftw3])
86
AC_CHECK_LIB(fftw3, fftw_malloc,
89
FFT_WRAPPER="fftlibw3_op.cpp"
90
AM_CONDITIONAL(FFTW3, true)
91
AM_CONDITIONAL(VDSP, false)
92
AC_DEFINE_UNQUOTED(FFTW3, 1, Use libfftw3)
95
echo "* libfft3 is needed to build this library."
97
AC_MSG_ERROR("Cannot build. Stop.")])
100
AC_SUBST(FFT_WRAPPER)
102
dnl Checks for header files.
104
dnl Checks for typedefs, structures, and compiler characteristics.
109
include/ofa1/Makefile
115
echo timestamp > stamp-h)