1 dnl Process this file with autoconf to produce a configure script.
4 AM_INIT_AUTOMAKE(gpiv, 0.2.0)
5 AM_CONFIG_HEADER(config.h)
7 dnl Pick up the Gnome macros.
8 AM_ACLOCAL_INCLUDE(macros)
17 GNOME_COMPILE_WARNINGS
20 dnl Add the languages which your application supports here.
21 ALL_LINGUAS="ca de nl"
23 dnl gnu gettext (intl directory) is old see http://developer.gnome.org/doc/tutorials/import.html
27 dnl Set PACKAGE_LOCALE_DIR in config.h.
28 if test "x${prefix}" = "xNONE"; then
29 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
31 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
34 dnl Subst PACKAGE_PIXMAPS_DIR.
35 PACKAGE_PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/${PACKAGE}"
36 AC_SUBST(PACKAGE_PIXMAPS_DIR)
40 dnl adding support for pixmap canvas
41 dnl AC_CHECK_LIB(gnomecanvaspixbuf, gnome_canvas_pixbuf_get_type, ,
42 dnl AC_MSG_ERROR("libgnomecanvaspixbuf not installed"))
44 dnl AC_CHECK_LIB(gnomecanvaspixbuf, transform_pixbuf, ,
45 dnl AC_MSG_ERROR("libgnomecanvaspixbuf not installed"))
47 dnl AC_DEFINE(LIBS, HAVE_LIBGNOMECANVASPIXBUF)
49 GNOME_CANVASPIX="-lgnomecanvaspixbuf"
50 AC_SUBST(GNOME_CANVASPIX)
52 AC_CHECK_LIB(gdk_pixbuf, gdk_pixbuf_new_from_data, ,
53 AC_MSG_ERROR("libgdk_pixbuf not installed"))
55 AC_CHECK_LIB(hdf5, H5Fcreate, ,
56 AC_MSG_ERROR("libhdf5 not installed"))
58 dnl AC_CHECK_LIB(gpiv, gpiv_error, [],
59 dnl AC_MSG_ERROR("libgpiv has not been installed"))
61 AC_CHECK_LIB(gpiv, gpiv_scan_resourcefiles, ,
62 AC_MSG_ERROR("libgpiv has not been installed"))
64 AC_CHECK_LIB(rfftw, rfftw2d_create_plan, ,
65 AC_MSG_ERROR("librfftw not installed"))
67 AC_CHECK_LIB(fftw, fftw_import_wisdom_from_string, ,
68 AC_MSG_ERROR("libfftw not installed"))
73 AC_CHECK_HEADERS([stdlib.h string.h unistd.h hdf5.h gpiv.h])
77 [ --disable-dac disable data acquisition module],
78 [DISABLE_DAC="-DDISABLE_DAC"]
84 if test "${DISABLE_DAC}" != '-DDISABLE_DAC'; then
85 AC_CHECK_LIB(gpiv, gpiv_dac_get_camvar, ,
86 AC_MSG_ERROR("DAC is not working in libgpiv. \
87 Enable DAC in libgpiv or disable it here with ./configure --disable-dac"))
89 AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
90 AC_MSG_ERROR("libraw1394 not installed"))
92 AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
93 AC_MSG_ERROR("libdc1394_control not installed"))
95 AC_CHECK_PROG(CONTROL, gpiv_control, true, false)
96 AM_CONDITIONAL(HAVE_CONTROL, $CONTROL)
98 AC_CHECK_HEADER(pthread.h, ,AC_MSG_ERROR("pthread.h is not installed"))
99 AC_CHECK_LIB(pthread, pthread_create, ,
100 AC_MSG_ERROR("libpthread has not been installed"))
106 [ --enable-rta=RTA_DIR place where the RTAI code resides
107 (default /usr/realtime)],
108 [RTA_TOPDIR="$enableval"],
109 [RTA_TOPDIR="/usr/realtime"]
116 [ --enable-k=K_DIR place where the installed kernel \
117 headers resides (default /usr/src/kernel-headers-2.4.27-adeos)],
118 [K_TOPDIR="$enableval"],
119 [K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"]
125 AC_ARG_ENABLE(img-width,
126 [ --enable-img-width=WIDTH maximum image width to \
127 be used (default SVGA)],
128 [OVERRIDE_IMAGE_WIDTH_MAX="-DIMAGE_WIDTH_MAX=$enableval"]
130 AC_SUBST(OVERRIDE_IMAGE_WIDTH_MAX)
134 AC_ARG_ENABLE(img-height,
135 [ --enable-img-height=HEIGHT maximum image height to \
136 be used (default SVGA)],
137 [OVERRIDE_IMAGE_HEIGHT_MAX="-DIMAGE_HEIGHT_MAX=$enableval"]
139 AC_SUBST(OVERRIDE_IMAGE_HEIGHT_MAX)
143 [ --enable-debug debug version (more verbose)],
155 doc/C/figures/Makefile
164 echo "===================================================================="
165 echo "Configuration succesfully finished"
166 if test $DISABLE_DAC; then
167 echo "without Data Acquisition."
169 echo "with Data Acquisition enabled."
170 if test x$CONTROL = xfalse ; then
171 echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't"
172 echo "resident as well". This script eases to install and uninstall the gpivtrig-rtl
173 echo "and RTAI kernel modules that are needed for the triggering of camera and lasers"
177 echo "Type 'make' and 'make install' to build and install gpiv"
178 echo "===================================================================="