1 AC_INIT(libgpiv, 0.6.1, ,)
2 AM_CONFIG_HEADER(config.h)
4 # Unstable (alpha), testing (beta) or stable
6 # Large improvements against previous Minor release
8 # Any changes: Improved functionality, added features, debugs, also changed API!
11 GPIV_VERSION=$GPIV_MAJOR_VERSION.$GPIV_MINOR_VERSION.$GPIV_MICRO_VERSION
13 AC_SUBST(GPIV_MAJOR_VERSION)
14 AC_SUBST(GPIV_MINOR_VERSION)
15 AC_SUBST(GPIV_MICRO_VERSION)
16 AC_SUBST(GPIV_VERSION)
18 # libtool versioning. See libtool-doc chapter 6.3.
19 LT_RELEASE=$GPIV_MAJOR_VERSION.$GPIV_MINOR_VERSION
24 #`expr $GPIV_BINARY_AGE - $GPIV_INTERFACE_AGE`
44 dnl AC_SUBST(LIBTOOL_DEPS)
48 dnl AM_MAINTAINER_MODE
50 dnl hints from autoscan START
56 dnl hints from autoscan END
58 dnl search at correct directory for system configuration file
59 dnl SYSRSCDIR="-DSYSTEM_RSC_DIR=\"$sysconfdir\""
60 dnl SYSRSCDIR="-DSYSTEM_RSC_DIR=\"$sysconfdir\""
61 dnl AC_SUBST(SYSRSCDIR)
62 dnl just hard-coded. SYSTEM_RSC_DIR is defined in gpiv.h
66 dnl Check for programs
68 AC_CHECK_PROG(GNUPLOT, gnuplot, true, false)
69 AM_CONDITIONAL(HAVE_GNUPLOT, $GNUPLOT, ,AC_MSG_ERROR("gnuplot not installed"))
71 AC_CHECK_PROG(PERL, perl, true, false)
72 AM_CONDITIONAL(HAVE_PERL, $PERL)
74 AC_PATH_PROG(DOXYGEN, doxygen)
75 if test x"$DOXYGEN" = "x"; then
76 AC_MSG_WARN(Cannot find doxygen to build documentation.
77 Have a look at http://www.doxygen.org/)
81 dnl Testing on Doxygen for documentation
82 dnl See http://www.bioinf.uni-freiburg.de/~mmann/HowTo/automake.html#doxygenSupport
84 dnl DX_DOXYGEN_FEATURE(ON|OFF)
85 dnl DX_DOT_FEATURE(ON|OFF)
87 DX_CHM_FEATURE(ON|OFF)
88 DX_CHI_FEATURE(ON|OFF)
89 DX_MAN_FEATURE(ON|OFF)
95 DX_INIT_DOXYGEN($PACKAGE, Doxyfile)
98 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
101 dnl Check for libraries
103 AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_2d, ,
104 AC_MSG_ERROR("libfftw3 not installed"))
108 AC_CHECK_LIB(hdf5, H5Fopen, ,
109 AC_MSG_ERROR("libhdf5 not installed"))
111 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0)
112 AC_SUBST(GLIB_CFLAGS)
115 AC_CHECK_LIB(m, main, ,
116 AC_MSG_ERROR("libm not installed"))
118 AC_CHECK_LIB(gslcblas, main, ,
119 AC_MSG_ERROR("libgslcblas not installed"))
121 AC_CHECK_LIB(gsl, main, ,
122 AC_MSG_ERROR("libgsl not installed"))
124 AC_CHECK_LIB(glib-2.0, g_malloc0, ,
125 AC_MSG_ERROR("libglib-2.0 not installed"))
127 AC_CHECK_LIB(png, main, ,
128 AC_MSG_ERROR("libpng not installed"))
130 AC_CHECK_PROG(PNMTOPNG, pnmtopng, true, false)
131 dnl AM_CONDITIONAL(HAVE_PNMTOPNG, $PNMTOPNG, ,
132 dnl AC_MSG_ERROR("pnmtopng from netpbm not installed");)
133 if test x$PNMTOPNG = xfalse ; then
134 AC_MSG_ERROR("pnmtopng from netpbm not installed");
139 dnl Enabling IEEE-1394 / Firewire camera
142 [ --enable-cam enable (IEEE-1394) camera],
143 [ENABLE_CAM="-DENABLE_CAM"]
149 dnl Enabling triggering system
152 [ --enable-trig enable (realtime) triggering],
153 [ENABLE_TRIG="-DENABLE_TRIG"]
155 AC_SUBST(ENABLE_TRIG)
158 if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then
159 AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
160 AC_MSG_ERROR("libraw1394 not installed"))
162 AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
163 AC_MSG_ERROR("libdc1394_control not installed"))
165 AC_CHECK_HEADER(libdc1394/dc1394_control.h, ,
166 AC_MSG_ERROR("missing dc1394_control.h"))
168 AC_CHECK_HEADER(libraw1394/raw1394.h, ,
169 AC_MSG_ERROR("missing raw1394.h"))
174 dnl Enabling RTAI for triggering system
177 [ --enable-rta=RTA_DIR place where the RTAI code resides
178 (default /usr/lib/realtime)],
179 [RTA_TOPDIR="$enableval"],
180 [RTA_TOPDIR="/usr/lib/realtime"]
187 dnl Enabling Message Passing Interface (MPI) for parallel computing
190 [ --enable-mpi enable message protocol interface],
191 [ENABLE_MPI="-DENABLE_MPI"]
196 if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then
197 ACX_MPI(AC_MSG_WARN("libmpi HAS BEEN installed"),
198 AC_MSG_ERROR("libmpi IS NOT installed"))
201 LIBS="$MPILIBS $LIBS"
203 AC_CHECK_LIB(mpi, main, ,
204 AC_MSG_ERROR("libmpi not installed"))
205 AC_CHECK_HEADER(mpi.h, ,
206 AC_MSG_ERROR("missing mpi.h"))
209 AM_CONDITIONAL(BUILD_MPI, test "${ENABLE_MPI}" == '-DENABLE_MPI')
215 dnl Enabling Open Multi-Processing (OMP) for parallel computing
218 [ --enable-omp enable Open Multi-Processing (OMP)],
219 [ENABLE_OMP="ENABLE_OMP"]
222 if test "${ENABLE_OMP}" == 'ENABLE_OMP'; then
225 AC_CHECK_LIB(gomp, main, ,
226 AC_MSG_ERROR("libgomp not installed"))
227 AC_CHECK_HEADER(omp.h, ,
228 AC_MSG_ERROR("missing omp.h"))
230 AC_CHECK_LIB(fftw3_threads, main, ,
231 AC_MSG_ERROR("libfftw3_threads not installed"))
233 dnl No need to use -DENABLE_OMP: gcc will enable _OPENMP
237 AC_CHECK_HEADERS([stdlib.h string.h time.h unistd.h fftw3.h hdf5.h \
240 AC_CHECK_FUNCS([memset sqrt strstr])
242 dnl AC_ARG_ENABLE(tmp-dir,
243 dnl [ --enable-tmp-dir=TMP_DIR temporary directory (default /tmp)],
244 dnl [OVERRIDE_TMP_DIR="-DTMP_DIR=$enableval"]
246 dnl AC_SUBST(OVERRIDE_TMP_DIR)
252 include/gpiv/Makefile
256 echo "===================================================================="
257 echo "Configuration succesfully finished"
259 if test $ENABLE_CAM; then
260 echo "with (IEEE-1394) camera enabled"
263 if test $ENABLE_TRIG; then
264 echo "with (realtime) triggering enabled."
267 if test $ENABLE_MPI; then
268 echo "building parallel library using Message Passing Interface (MPI)"
269 echo "for processing on distributed memory systems"
272 if test $ENABLE_OMP; then
273 echo "building parallel library using Open Multi-Processing (OMP)"
274 echo "for processing on shared memory systems"
277 echo "Type 'make' and 'make install' to build and install libgpiv"
279 if test $DOXYGEN; then
280 echo "Type 'make doxygen-doc/-(un)install' for the API documentation"
282 echo "Cannot find doxygen: API documentation cannot be build"
285 echo "===================================================================="