1 dnl Process this file with autoconf to produce a configure script.
3 dnl =========== Initialization
4 AC_INIT(gpiv, 0.5.2, 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"))
87 AC_CHECK_LIB(gpiv, gpiv_piv_interrogate_ia, ,
88 AC_MSG_ERROR([libgpiv has not been installed]))
89 AC_CHECK_LIB(gpiv, gpiv_scan_resourcefiles, ,
90 AC_MSG_ERROR([libgpiv has not been installed]))
92 dnl AC_CHECK_HEADER(gpiv.h, ,AC_MSG_ERROR("giv.h is not installed"))
93 AC_CHECK_HEADERS([stdlib.h string.h unistd.h fftw3.h gpiv.h])
97 [ --enable-cam enable data acquisition],
98 [ENABLE_CAM="-DENABLE_CAM"]
104 [ --enable-trig enable (realtime) triggering],
105 [ENABLE_TRIG="-DENABLE_TRIG"]
107 AC_SUBST(ENABLE_TRIG)
110 if test $ENABLE_CAM || test $ENABLE_TRIG; then
111 ENABLE_DAC="-DENABLE_DAC"
115 if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then
116 AC_CHECK_LIB(gpiv, gpiv_cam_get_camvar, ,
117 AC_MSG_ERROR("(IEEE-1394) camera is not working in libgpiv. \
118 Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure"))
120 AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
121 AC_MSG_ERROR("libraw1394 not installed"))
123 AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
124 AC_MSG_ERROR("libdc1394_control not installed"))
126 AC_CHECK_HEADER(libdc1394/dc1394_control.h, ,
127 AC_MSG_ERROR("missing dc1394_control.h"))
129 AC_CHECK_HEADER(libraw1394/raw1394.h, ,
130 AC_MSG_ERROR("missing raw1394.h"))
134 if test "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then
135 AC_CHECK_LIB(gpiv, gpiv_trig_openrtfs, ,
136 AC_MSG_ERROR("(Realtime) triggering is not working in libgpiv. \
137 Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure"))
141 AC_CHECK_PROG(CONTROL, gpiv_control, true, false)
142 AM_CONDITIONAL(HAVE_CONTROL, $CONTROL)
145 [ --enable-rta=RTA_DIR place where the RTAI code resides
146 (default /usr/lib/realtime)],
147 [RTA_TOPDIR="$enableval"],
148 [RTA_TOPDIR="/usr/lib/realtime"]
154 [ --enable-k=K_DIR place where the installed kernel
156 (default /usr/src/kernel-headers-2.4.27-adeos)],
157 [K_TOPDIR="$enableval"],
158 [K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"]
163 AC_ARG_ENABLE(img-width,
164 [ --enable-img-width=WIDTH maximum image width to be used (default SVGA)],
165 [OVERRIDE_IMAGE_WIDTH_MAX="-DIMAGE_WIDTH_MAX=$enableval"]
167 AC_SUBST(OVERRIDE_IMAGE_WIDTH_MAX)
171 AC_ARG_ENABLE(img-height,
172 [ --enable-img-height=HEIGHT maximum image height to be used (default SVGA)],
173 [OVERRIDE_IMAGE_HEIGHT_MAX="-DIMAGE_HEIGHT_MAX=$enableval"]
175 AC_SUBST(OVERRIDE_IMAGE_HEIGHT_MAX)
178 AC_ARG_ENABLE(canvas_aa,
179 [ --enable-canvas-aa Use Anti Aliased canvas for viewer; slower but
180 better displaying of image and resulting data],
181 [CANVAS_AA="-DCANVAS_AA"]
187 [ --enable-debug debug version (more verbose)],
194 dnl GNOME_DISABLE_DEPRECATED="-DGNOME_DISABLE_DEPRECATED"
195 dnl AC_SUBST(GNOME_DISABLE_DEPRECATED)
202 doc/C/figures/Makefile
210 echo "===================================================================="
211 echo "Configuration succesfully finished"
212 if test $HAVE_GNOME_PRINT; then
213 echo "with gnomeprint"
215 echo "without gnomeprint"
218 if test $ENABLE_CAM; then
219 echo "with (IEEE-1394) camera enabled"
222 if test $ENABLE_TRIG; then
223 echo "with (realtime) triggering enabled."
225 if test x$CONTROL = xfalse ; then
226 echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't"
227 echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl"
228 echo "and RTAI kernel modules that are needed for the triggering of camera and lasers"
232 echo "Type 'make' and 'make install' to build and install gpiv"
233 echo "===================================================================="