1 dnl Process this file with autoconf to produce a configure script.
3 dnl =========== Initialization
4 AC_INIT(gpiv, 0.6.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gpiv)
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
9 dnl =========== basic compiler settings
16 dnl ========== Export Compiler/linker options
17 # ============ Switched off:
23 GNOME_COMPILE_WARNINGS
24 PKG_CHECK_MODULES(GPIV_UI, libgnomeui-2.0)
25 GPIV_GNOME_LIBS="libgnomeui-2.0"
26 echo "configuring with libraries: " $gpiv_gnome_libs
27 PKG_CHECK_MODULES(GPIV, $GPIV_GNOME_LIBS)
32 dnl ========== Add the languages which the application supports.
34 AC_SUBST(GETTEXT_PACKAGE)
35 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
36 ALL_LINGUAS="ca de nl"
43 dnl =========== Checking on libraries and headers
44 AC_CHECK_LIB(glib-2.0, g_malloc0, ,
45 AC_MSG_ERROR("libglib not installed"))
48 dnl AC_CHECK_LIB(hdf5, H5Fopen, ,
49 dnl AC_MSG_ERROR("libhdf5 not installed"))
52 dnl ========== include fftw3
53 AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_2d, ,
54 AC_MSG_ERROR("libfftw3 not installed"))
56 AC_CHECK_LIB(gslcblas, main, ,
57 AC_MSG_ERROR("libgslcblas not installed"))
59 AC_CHECK_LIB(gsl, main, ,
60 AC_MSG_ERROR("libgsl not installed"))
62 dnl AC_CHECK_LIB(gslcblas, gsl_fit_linear, ,
63 dnl AC_MSG_ERROR("libgsl not installed"))
66 dnl Enabling Message Passing Interface (MPI) for parallel computing
69 [ --enable-mpi enable Message Protocol Interface (MPI)],
70 [ENABLE_MPI="-DENABLE_MPI"]
75 [ --enable-rr checks also for MPI-enabled gpiv_rr ],
76 [ENABLE_MPI_RR="-DENABLE_MPI_RR"]
78 AC_SUBST(ENABLE_MPI_RR)
80 if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then
81 dnl ACX_MPI(AC_MSG_WARN("libmpi HAS BEEN installed"),
82 dnl AC_MSG_ERROR("libmpi IS NOT installed"))
84 AC_CHECK_HEADER(mpi/mpi.h, ,AC_MSG_ERROR("mpi.h is not installed"))
86 AC_CHECK_PROG(MPIRUN, mpirun, true, false)
87 if test x$MPIRUN = xfalse ; then
88 AC_MSG_ERROR("missing mpirun \
89 Needed by gpiv when --enable-mpi")
92 if test "${ENABLE_MPI_RR}" == '-DENABLE_MPI_RR'; then
93 AC_CHECK_PROG(RR, gpiv_rr, true, false)
94 if test x$RR = xfalse ; then
95 AC_MSG_ERROR("missing mpi-enabled gpiv_rr from gpivtools. \
96 Needed by gpiv when --enable-mpi.")
99 echo "WARNING: Not checking on MPI-enabled gpiv_rr"
102 AC_CHECK_LIB(gpiv_mpi, gpiv_piv_mpi_bcast_pivpar, ,
103 AC_MSG_ERROR("gpiv_piv_mpi_bcast_pivpar is not working in libgpiv_mpi. \
104 Enable MPI in libgpiv or disable it here by leaving out --enable-mpi during ./configure"))
107 AC_CHECK_LIB(gpiv, gpiv_piv_interrogate_img, ,
108 AC_MSG_ERROR([libgpiv has not been installed]))
112 dnl AC_CHECK_HEADER(gpiv.h, ,AC_MSG_ERROR("giv.h is not installed"))
113 AC_CHECK_HEADERS([stdlib.h string.h unistd.h fftw3.h gpiv.h])
117 [ --enable-cam enable data acquisition],
118 [ENABLE_CAM="-DENABLE_CAM"]
124 [ --enable-trig enable (realtime) triggering],
125 [ENABLE_TRIG="-DENABLE_TRIG"]
127 AC_SUBST(ENABLE_TRIG)
130 if test $ENABLE_CAM || test $ENABLE_TRIG; then
131 ENABLE_DAC="-DENABLE_DAC"
135 if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then
136 AC_CHECK_LIB(gpiv, gpiv_cam_get_camvar, ,
137 AC_MSG_ERROR("(IEEE-1394) camera is not working in libgpiv. \
138 Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure"))
140 AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
141 AC_MSG_ERROR("libraw1394 not installed"))
143 AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
144 AC_MSG_ERROR("libdc1394_control not installed"))
146 AC_CHECK_HEADER(libdc1394/dc1394_control.h, ,
147 AC_MSG_ERROR("missing dc1394_control.h"))
149 AC_CHECK_HEADER(libraw1394/raw1394.h, ,
150 AC_MSG_ERROR("missing raw1394.h"))
154 if test "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then
155 AC_CHECK_LIB(gpiv, gpiv_trig_openrtfs, ,
156 AC_MSG_ERROR("(Realtime) triggering is not working in libgpiv. \
157 Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure"))
161 AC_CHECK_PROG(CONTROL, gpiv_control, true, false)
162 AM_CONDITIONAL(HAVE_CONTROL, $CONTROL)
165 [ --enable-rta=RTA_DIR place where the RTAI code resides
166 (default /usr/lib/realtime)],
167 [RTA_TOPDIR="$enableval"],
168 [RTA_TOPDIR="/usr/lib/realtime"]
174 [ --enable-k=K_DIR place where the installed kernel
176 (default /usr/src/kernel-headers-2.4.27-adeos)],
177 [K_TOPDIR="$enableval"],
178 [K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"]
183 AC_ARG_ENABLE(img-width,
184 [ --enable-img-width=WIDTH maximum image width to be used (default SVGA)],
185 [OVERRIDE_IMAGE_WIDTH_MAX="-DIMAGE_WIDTH_MAX=$enableval"]
187 AC_SUBST(OVERRIDE_IMAGE_WIDTH_MAX)
191 AC_ARG_ENABLE(img-height,
192 [ --enable-img-height=HEIGHT maximum image height to be used (default SVGA)],
193 [OVERRIDE_IMAGE_HEIGHT_MAX="-DIMAGE_HEIGHT_MAX=$enableval"]
195 AC_SUBST(OVERRIDE_IMAGE_HEIGHT_MAX)
198 AC_ARG_ENABLE(canvas_aa,
199 [ --enable-canvas-aa Use Anti Aliased canvas for viewer; slower but
200 better displaying of image and resulting data],
201 [CANVAS_AA="-DCANVAS_AA"]
207 [ --enable-debug debug version (more verbose)],
214 dnl GNOME_DISABLE_DEPRECATED="-DGNOME_DISABLE_DEPRECATED"
215 dnl AC_SUBST(GNOME_DISABLE_DEPRECATED)
222 doc/C/figures/Makefile
230 echo "===================================================================="
231 echo "Configuration succesfully finished"
233 if test $ENABLE_CAM; then
234 echo "with (IEEE-1394) camera enabled"
237 if test $ENABLE_TRIG; then
238 echo "with (realtime) triggering enabled."
240 if test x$CONTROL = xfalse ; then
241 echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't"
242 echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl"
243 echo "and RTAI kernel modules that are needed for the triggering of camera and lasers"
248 if test $ENABLE_MPI; then
249 echo "Using Message Passing Interface (MPI)."
250 echo "for processing on distributed memory systems"
251 echo "MPI-enabled gpivtools package is needed for correct funtioning"
254 echo "Type 'make' and 'make install' to build and install gpiv"
255 echo "===================================================================="