1 dnl Process this file with autoconf to produce a configure script.
3 dnl =========== Initialization
4 AC_INIT(gpiv, 0.6.0, 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
25 #------------------------------------------------------------------------------
27 # The gnomeui library is required but the gnomeprint and gnomeprintui libraries
28 # are optional. First we verify the gnomeui library is present. Then we check
29 # for the presence of the gnomeprint libraries and set a flag to indicate the
30 # print libraries are present. Finally, we run pkg-config to get the compile and
31 # link flags for the combined set of libraries to eliminate duplications in
33 ## GNOME_MODULES="libgnomeui-2 >= 2.0.0"
34 GNOME_PRINT="libgnomeprint-2.2 >= 2.2.0 libgnomeprintui-2.2 >=2.2.0"
35 PKG_CHECK_MODULES(GPIV_UI, libgnomeui-2.0)
36 PKG_CHECK_MODULES(GPIV_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
37 gpiv_have_gnome_print=1, echo "gnomeprint libraries are not available.")
39 if test "x$gpiv_have_gnome_print" = "x1"; then
40 echo "gnomeprint IS available"
41 AC_DEFINE(HAVE_GNOME_PRINT,"1")
42 GPIV_GNOME_LIBS="libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2"
44 echo "gnomeprint NOT available"
45 GPIV_GNOME_LIBS="libgnomeui-2.0"
48 echo "configuring with libraries: " $gpiv_gnome_libs
49 PKG_CHECK_MODULES(GPIV, $GPIV_GNOME_LIBS)
54 dnl ========== Add the languages which the application supports.
56 AC_SUBST(GETTEXT_PACKAGE)
57 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
58 ALL_LINGUAS="ca de nl"
65 dnl =========== Checking on libraries and headers
66 AC_CHECK_LIB(glib-2.0, g_malloc0, ,
67 AC_MSG_ERROR("libglib not installed"))
70 dnl AC_CHECK_LIB(hdf5, H5Fopen, ,
71 dnl AC_MSG_ERROR("libhdf5 not installed"))
74 dnl ========== include fftw3
75 AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_2d, ,
76 AC_MSG_ERROR("libfftw3 not installed"))
78 AC_CHECK_LIB(gslcblas, main, ,
79 AC_MSG_ERROR("libgslcblas not installed"))
81 AC_CHECK_LIB(gsl, main, ,
82 AC_MSG_ERROR("libgsl not installed"))
84 dnl AC_CHECK_LIB(gslcblas, gsl_fit_linear, ,
85 dnl AC_MSG_ERROR("libgsl not installed"))
88 dnl Enabling Message Passing Interface (MPI) for parallel computing
91 [ --enable-mpi enable Message Protocol Interface (MPI)],
92 [ENABLE_MPI="-DENABLE_MPI"]
96 if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then
97 dnl ACX_MPI(AC_MSG_WARN("libmpi HAS BEEN installed"),
98 dnl AC_MSG_ERROR("libmpi IS NOT installed"))
100 AC_CHECK_PROG(MPIRUN, mpirun, true, false)
101 if test x$MPIRUN = xfalse ; then
102 AC_MSG_ERROR("missing mpirun \
103 Needed by gpiv when --enable-mpi")
106 AC_CHECK_PROG(RR, gpiv_rr, true, false)
107 if test x$RR = xfalse ; then
108 AC_MSG_ERROR("missing mpi-enabled gpiv_rr from gpivtools. \
109 Needed by gpiv when --enable-mpi")
112 AC_CHECK_LIB(gpiv_mpi, gpiv_piv_mpi_bcast_pivpar, ,
113 AC_MSG_ERROR("gpiv_piv_mpi_bcast_pivpar is not working in libgpiv_mpi. \
114 Enable MPI in libgpiv or disable it here by leaving out --enable-mpi during ./configure"))
117 AC_CHECK_LIB(gpiv, gpiv_piv_interrogate_img, ,
118 AC_MSG_ERROR([libgpiv has not been installed]))
122 dnl AC_CHECK_HEADER(gpiv.h, ,AC_MSG_ERROR("giv.h is not installed"))
123 AC_CHECK_HEADERS([stdlib.h string.h unistd.h fftw3.h gpiv.h])
127 [ --enable-cam enable data acquisition],
128 [ENABLE_CAM="-DENABLE_CAM"]
134 [ --enable-trig enable (realtime) triggering],
135 [ENABLE_TRIG="-DENABLE_TRIG"]
137 AC_SUBST(ENABLE_TRIG)
140 if test $ENABLE_CAM || test $ENABLE_TRIG; then
141 ENABLE_DAC="-DENABLE_DAC"
145 if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then
146 AC_CHECK_LIB(gpiv, gpiv_cam_get_camvar, ,
147 AC_MSG_ERROR("(IEEE-1394) camera is not working in libgpiv. \
148 Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure"))
150 AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
151 AC_MSG_ERROR("libraw1394 not installed"))
153 AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
154 AC_MSG_ERROR("libdc1394_control not installed"))
156 AC_CHECK_HEADER(libdc1394/dc1394_control.h, ,
157 AC_MSG_ERROR("missing dc1394_control.h"))
159 AC_CHECK_HEADER(libraw1394/raw1394.h, ,
160 AC_MSG_ERROR("missing raw1394.h"))
164 if test "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then
165 AC_CHECK_LIB(gpiv, gpiv_trig_openrtfs, ,
166 AC_MSG_ERROR("(Realtime) triggering is not working in libgpiv. \
167 Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure"))
171 AC_CHECK_PROG(CONTROL, gpiv_control, true, false)
172 AM_CONDITIONAL(HAVE_CONTROL, $CONTROL)
175 [ --enable-rta=RTA_DIR place where the RTAI code resides
176 (default /usr/lib/realtime)],
177 [RTA_TOPDIR="$enableval"],
178 [RTA_TOPDIR="/usr/lib/realtime"]
184 [ --enable-k=K_DIR place where the installed kernel
186 (default /usr/src/kernel-headers-2.4.27-adeos)],
187 [K_TOPDIR="$enableval"],
188 [K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"]
193 AC_ARG_ENABLE(img-width,
194 [ --enable-img-width=WIDTH maximum image width to be used (default SVGA)],
195 [OVERRIDE_IMAGE_WIDTH_MAX="-DIMAGE_WIDTH_MAX=$enableval"]
197 AC_SUBST(OVERRIDE_IMAGE_WIDTH_MAX)
201 AC_ARG_ENABLE(img-height,
202 [ --enable-img-height=HEIGHT maximum image height to be used (default SVGA)],
203 [OVERRIDE_IMAGE_HEIGHT_MAX="-DIMAGE_HEIGHT_MAX=$enableval"]
205 AC_SUBST(OVERRIDE_IMAGE_HEIGHT_MAX)
208 AC_ARG_ENABLE(canvas_aa,
209 [ --enable-canvas-aa Use Anti Aliased canvas for viewer; slower but
210 better displaying of image and resulting data],
211 [CANVAS_AA="-DCANVAS_AA"]
217 [ --enable-debug debug version (more verbose)],
224 dnl GNOME_DISABLE_DEPRECATED="-DGNOME_DISABLE_DEPRECATED"
225 dnl AC_SUBST(GNOME_DISABLE_DEPRECATED)
232 doc/C/figures/Makefile
240 echo "===================================================================="
241 echo "Configuration succesfully finished"
242 if test $HAVE_GNOME_PRINT; then
243 echo "with gnomeprint"
245 echo "without gnomeprint"
248 if test $ENABLE_CAM; then
249 echo "with (IEEE-1394) camera enabled"
252 if test $ENABLE_TRIG; then
253 echo "with (realtime) triggering enabled."
255 if test x$CONTROL = xfalse ; then
256 echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't"
257 echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl"
258 echo "and RTAI kernel modules that are needed for the triggering of camera and lasers"
263 if test $ENABLE_MPI; then
264 echo "Using Message Passing Interface (MPI)"
265 echo "for processing on distributed memory systems"
268 echo "Type 'make' and 'make install' to build and install gpiv"
269 echo "===================================================================="