File: configure.in

package info (click to toggle)
gpivtools 0.5.2-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,500 kB
  • ctags: 487
  • sloc: ansic: 6,727; sh: 5,386; perl: 1,173; makefile: 250
file content (195 lines) | stat: -rw-r--r-- 5,285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
AC_INIT(src/evaluate/rr.c)
AM_INIT_AUTOMAKE(gpivtools, 0.5.2)
AM_CONFIG_HEADER(config.h)

AM_SANITY_CHECK
AC_ISC_POSIX

AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

AM_MAINTAINER_MODE

dnl hints from autoscan START
AC_C_CONST
AC_FUNC_VPRINTF
AC_PROG_AWK
AC_PROG_RANLIB
AC_TYPE_SIZE_T
dnl hints from autoscan END


AC_CHECK_PROG(GNUPLOT, gnuplot, true, false)
AM_CONDITIONAL(HAVE_GNUPLOT, $GNUPLOT, ,
	AC_MSG_ERROR("gnuplot not installed");)
dnl if test x$GNUPLOT = xfalse ; then
dnl  	AC_MSG_ERROR("gnuplot not installed");
dnl fi

dnl dnl PKG_CHECK_MODULES(gpiv, glib >= 1.2.0)
dnl AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR("glib not installed"))
dnl AC_CHECK_LIB(glib, g_malloc0, , 
dnl	AC_MSG_ERROR("libglib not installed"))
dnl AC_CHECK_HEADER(glib-1.2/glib.h, ,
dnl AC_MSG_ERROR("missing glib-1.2/glib.h")
dnl )

PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

AC_CHECK_LIB(glib-2.0, g_malloc0, ,
        AC_MSG_ERROR("libglib not installed"))

AC_CHECK_PROG(PERL, perl, true, false)
AM_CONDITIONAL(HAVE_PERL, $PERL)
AC_CHECK_PROG(CONVERT, convert, true, false)
AM_CONDITIONAL(HAVE_CONVERT, $CONVERT)
AC_CHECK_PROG(PLOTMTV, plotmtv, true, false)
AM_CONDITIONAL(HAVE_PLOTMTV, $PLOTMTV)

AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_2d, , 
			AC_MSG_ERROR("libfftw3 not installed"))

AC_CHECK_LIB(gslcblas, main, ,
        AC_MSG_ERROR("libgslcblas not installed"))

AC_CHECK_LIB(gsl, main, , 
 	AC_MSG_ERROR("libgsl not installed"))

dnl AC_CHECK_HEADER(gpiv.h, ,
dnl AC_MSG_ERROR("missing gpiv.h"))
AC_CHECK_LIB(gpiv, gpiv_error, ,
	AC_MSG_ERROR("libgpiv has not been installed"))
dnl AC_CHECK_LIB(gpiv, gpiv_scan_resourcefiles, ,
dnl 	AC_MSG_ERROR("libgpiv has not been installed"))
dnl AC_CHECK_LIB(gpiv, gpiv_alloc_img, ,
dnl 	AC_MSG_ERROR("libgpiv has not been installed"))


AC_CHECK_HEADERS([ stdlib.h string.h unistd.h \
	fftw3.h \
	gpiv.h \
], ,
dnl	 AC_MSG_ERROR("missing one of the required library headers")
)




AC_ARG_ENABLE(cam, 
         [  --enable-cam            enable (IEEE-1394) camera],
         [ENABLE_CAM="-DENABLE_CAM"]
         )
AC_SUBST(ENABLE_CAM)


AC_ARG_ENABLE(trig, 
         [  --enable-trig           enable (realtime) triggering],
         [ENABLE_TRIG="-DENABLE_TRIG"]
         )
AC_SUBST(ENABLE_TRIG)


if test  "${ENABLE_CAM}" == '-DENABLE_CAM'; then
	AC_CHECK_LIB(gpiv, gpiv_cam_get_camvar, ,
	AC_MSG_ERROR("(IEEE-1394) camera is not working in libgpiv. \
Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure"))

	AC_CHECK_LIB(raw1394, raw1394_destroy_handle, ,
	AC_MSG_ERROR("libraw1394 not installed"))

	AC_CHECK_LIB(dc1394_control, dc1394_create_handle, ,
	AC_MSG_ERROR("libdc1394_control not installed"))

	AC_CHECK_HEADER(libdc1394/dc1394_control.h, ,
	AC_MSG_ERROR("missing dc1394_control.h"))

	AC_CHECK_HEADER(libraw1394/raw1394.h, ,
	AC_MSG_ERROR("missing raw1394.h"))
fi


if test  "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then
	AC_CHECK_LIB(gpiv, gpiv_trig_openrtfs, ,
	AC_MSG_ERROR("(Realtime) triggering is not working in libgpiv. \
Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure"))
fi


AC_CHECK_PROG(CONTROL, gpiv_control, true, false)
AM_CONDITIONAL(HAVE_CONTROL, $CONTROL)



AC_ARG_ENABLE(rta, 
	[  --disable-rta=RTATOPDIR     place where the RTAI code \
resides (default /usr/lib/realtime)],
	[RTA_TOPDIR="$enableval"],
	[RTA_TOPDIR="/usr/lib/realtime"]
	)
AC_SUBST(RTA_TOPDIR)

AC_ARG_ENABLE(k, 
	[  --enable-k=KTOPDIR     place where the installed kernel \
headers resides (default /usr/src/kernel-headers-2.4.27-adeos)],
	[K_TOPDIR="$enableval"],
	[K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"]
	)
AC_SUBST(K_TOPDIR)



AC_FUNC_ALLOCA
AC_OUTPUT([
	Makefile
	src/Makefile
	src/dac/Makefile
	src/image/Makefile
	src/evaluate/Makefile
	src/validate/Makefile
	src/post/Makefile
	src/misc/Makefile
	man/Makefile
])

echo "===================================================================="
 if test x$PERL = xfalse ; then
	echo "Perl has not been found on this system."
	echo "Though, this is not provided for the building process"
	echo "Only some independant scripts will not work"
	echo ""
 fi

 if test x$CONVERT = xfalse ; then
	echo "Convert has not been found on this system."
	echo "Though, this is not provided for the building process"
	echo "Only some independant scripts will not work"
	echo ""
 fi

 if test x$PLOTMTV = xfalse ; then
	echo "Plotmtv has not been found on this system."
	echo "Though, this is not provided for the building process"
	echo "Only some independant scripts will not work"
	echo ""
 fi


 echo "Configuration succesfully finished"
 if test $ENABLE_CAM; then 
	echo "with (IEEE-1394) camera enabled"
 fi

 if test $ENABLE_TRIG; then 
	echo "with (realtime) triggering enabled."
	if test x$CONTROL = xfalse ; then
		echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't"
		echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl"
		echo "and RTAI kernel modules that are needed for the triggering of camera and lasers."
		echo ""
	 fi
 fi
	echo "Type 'make' and 'make install' to build and install the gpiv-tools."
echo "===================================================================="