1 | ######################################################################
|
---|
2 | # Autoconf initial setup
|
---|
3 | ######################################################################
|
---|
4 |
|
---|
5 | #[AC_]PACKAGE_NAME
|
---|
6 | #[AC_]PACKAGE_TARNAME
|
---|
7 | #[AC_]PACKAGE_VERSION
|
---|
8 | #[AC_]PACKAGE_STRING
|
---|
9 | #[AC_]PACKAGE_BUGREPORT
|
---|
10 | AC_INIT([FACT++],[1.0],[thomas.bretz@phys.ethz.ch],[FACTpp],[https://www.fact-project.org/svn/trunk/FACT++/])
|
---|
11 | AC_PREREQ([2.65])
|
---|
12 | AC_CONFIG_FILES([Makefile]) # causes x/Makefile.in to be created if x/Makefile.am exists
|
---|
13 | #AC_CONFIG_HEADERS([config.h])
|
---|
14 | AC_CONFIG_MACRO_DIR([.macro_dir])
|
---|
15 | AC_CONFIG_AUX_DIR([.aux_dir]) # /usr/share/libtool/config /usr/share/automake-x.xx
|
---|
16 |
|
---|
17 | # Make sure none of the following will set -O2
|
---|
18 | AC_ARG_ENABLE([optimization],
|
---|
19 | AS_HELP_STRING([--disable-optimization], [Compile with -O0 instead of -O3])
|
---|
20 | )
|
---|
21 | AS_IF([test "x$enable_optimization" != "xno"], [MYFLAGS+=" -O3"], [MYFLAGS+=" -O0"])
|
---|
22 |
|
---|
23 | AC_ARG_ENABLE([debug],
|
---|
24 | AS_HELP_STRING([--enable-debug], [Compile with debugging symbols (-g)])
|
---|
25 | )
|
---|
26 | AS_IF([test "x$enable_debug" = "xyes"], [MYFLAGS+=" -g"])
|
---|
27 |
|
---|
28 | CFLAGS+=$MYFLAGS
|
---|
29 | CXXFLAGS+=$MYFLAGS
|
---|
30 |
|
---|
31 | AC_PROG_CC([gcc])
|
---|
32 | AC_PROG_CXX([g++])
|
---|
33 |
|
---|
34 | COLORGCC=`which colorgcc`
|
---|
35 | AS_IF([test -n "$COLORGCC"], [
|
---|
36 | AC_CONFIG_LINKS([g++:$COLORGCC gcc:$COLORGCC])
|
---|
37 | PATH=./:$PATH
|
---|
38 | ])
|
---|
39 |
|
---|
40 | #AC_PROG_CC_C99
|
---|
41 | AC_PROG_CC_STDC
|
---|
42 |
|
---|
43 | ######################################################################
|
---|
44 | # GNUC extension support (needed for the event builder)
|
---|
45 | ######################################################################
|
---|
46 |
|
---|
47 | AC_USE_SYSTEM_EXTENSIONS(_GNU_SOURCE)
|
---|
48 |
|
---|
49 | ######################################################################
|
---|
50 | # Check for right C++ standard
|
---|
51 | ######################################################################
|
---|
52 |
|
---|
53 | #AC_CXX_HEADER_STDCXX_0X
|
---|
54 | AC_CXX_COMPILE_STDCXX_0X
|
---|
55 | AS_IF([test "$ax_cv_cxx_compile_cxx0x_cxx" != yes],
|
---|
56 | AC_MSG_ERROR([C++0x standard (-std=c++0x) not supported by compiler.]))
|
---|
57 |
|
---|
58 | # Postponed after the BOOST library tests otherwise the check for boost::thread fails
|
---|
59 | #CXXFLAGS+=" -std=c++0x"
|
---|
60 |
|
---|
61 | PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1, HAVE_DBUS=yes, HAVE_DBUS=no)
|
---|
62 |
|
---|
63 | CPPFLAGS+=" `pkg-config --cflags dbus-1 dbus-glib-1`"
|
---|
64 | LDFLAGS+=" `pkg-config --libs dbus-1 dbus-glib-1`"
|
---|
65 |
|
---|
66 | # dbus-1
|
---|
67 | # dbus-glib-1
|
---|
68 | # QtOpenGL
|
---|
69 | # gl
|
---|
70 | # QtCore
|
---|
71 | # cfitsio
|
---|
72 |
|
---|
73 | ######################################################################
|
---|
74 | # Setup the libtool and the language
|
---|
75 | ######################################################################
|
---|
76 |
|
---|
77 | AM_PROG_AR
|
---|
78 | LT_INIT([disable-static])
|
---|
79 | AC_LANG(C++)
|
---|
80 | #AC_PATH_XTRA
|
---|
81 |
|
---|
82 | ######################################################################
|
---|
83 | # Automake initial setup
|
---|
84 | ######################################################################
|
---|
85 | AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects std-options no-define color-tests parallel-tests silent-rules])
|
---|
86 | AM_SILENT_RULES([yes])
|
---|
87 |
|
---|
88 | AM_PROG_CC_C_O
|
---|
89 |
|
---|
90 | ######################################################################
|
---|
91 | # DOXYGEN SUPPORT
|
---|
92 | ######################################################################
|
---|
93 |
|
---|
94 | ### FIXME: Need a configure commandline switch
|
---|
95 | DX_ENV_APPEND(EXTRACT_ALL, YES)
|
---|
96 | DX_ENV_APPEND(RECURSIVE, YES)
|
---|
97 | DX_ENV_APPEND(ALL_GRAPHS, NO) # change to yes to switch on call(er) graphs
|
---|
98 |
|
---|
99 | #DX_DOXYGEN_FEATURE(ON)
|
---|
100 | DX_DOT_FEATURE(ON) # sets HAVE_DOT
|
---|
101 | #DX_HTML_FEATURE(ON) # sets GENERATE_HTML (default)
|
---|
102 | #DX_CHM_FEATURE(ON|OFF) # sets GENERATE_HTMLHELP
|
---|
103 | #DX_CHI_FEATURE(ON|OFF) # sets GENERATE_CHI
|
---|
104 | #DX_MAN_FEATURE(ON) # sets GENERATE_MAN (segfaults)
|
---|
105 | #DX_RTF_FEATURE(ON|OFF) # sets GENERATE_RTF
|
---|
106 | #DX_XML_FEATURE(ON|OFF) # sets GENERATE_XML
|
---|
107 | #DX_PDF_FEATURE(ON|OFF) # sets GENERATE_PDF (default)
|
---|
108 | DX_PS_FEATURE(OFF) # sets GENERATE_PS (default)
|
---|
109 | DX_INIT_DOXYGEN($PACKAGE_NAME)#, DOXYFILE-PATH, [OUTPUT-DIR])
|
---|
110 |
|
---|
111 | #USE_HTAGS = $(USE_HTAGS)
|
---|
112 |
|
---|
113 | ######################################################################
|
---|
114 | # pthread/Readline/NCurses (pthread needed by dim and boost)
|
---|
115 | ######################################################################
|
---|
116 |
|
---|
117 | AC_LANG_PUSH(C)
|
---|
118 |
|
---|
119 | # Check for math library (some linux need this to compile cfitsio)
|
---|
120 | AC_CHECK_LIB([m],[cos])
|
---|
121 |
|
---|
122 | # Needed to compile dim
|
---|
123 | ACX_PTHREAD
|
---|
124 |
|
---|
125 | CPPFLAGS+=" "$PTHREAD_CFLAGS
|
---|
126 | LDFLAGS+=" "$PTHREAD_CFLAGS
|
---|
127 |
|
---|
128 |
|
---|
129 | # Needed to compile FACT++
|
---|
130 | AC_CHECK_READLINE
|
---|
131 | AS_IF([test "x$have_readline" != "xyes"],
|
---|
132 | AC_MSG_ERROR([The readline library is not properly installed.]))
|
---|
133 |
|
---|
134 | CPPFLAGS+=" "$READLINE_INCLUDES
|
---|
135 | LDFLAGS+=" "$READLINE_LIBS
|
---|
136 |
|
---|
137 | # Needed to compile FACT++
|
---|
138 | AC_CHECK_HEADERS([panel.h],,
|
---|
139 | AC_MSG_ERROR([ncurses header not found]))
|
---|
140 |
|
---|
141 | # Needed to compile FACT++
|
---|
142 | AC_CHECK_LIB(panel, update_panels,,
|
---|
143 | AC_MSG_ERROR([ncurses panel library not found]))
|
---|
144 |
|
---|
145 | # Xm.h (lesstif/motif, needed to compile did)
|
---|
146 | AC_FIND_MOTIF
|
---|
147 |
|
---|
148 | CPPFLAGS+=" "$MOTIF_INCL
|
---|
149 | LDFLAGS+=" "$MOTIF_LDFLAGS
|
---|
150 |
|
---|
151 | AM_COND_IF(HAS_LIBXP,,
|
---|
152 | AC_MSG_WARN([ Motif/lesstif not found!])
|
---|
153 | )
|
---|
154 |
|
---|
155 | # Required in did.c
|
---|
156 | LDFLAGS+=" -lXt -lX11 "
|
---|
157 |
|
---|
158 | # Check for zlib and exit with error if not found (defines HAVE_LIBZ)
|
---|
159 | AC_CHECK_PACKAGE(zlib, inflateEnd, z, zlib.h,
|
---|
160 | HAVE_ZLIB=yes, HAVE_ZLIB=no)
|
---|
161 |
|
---|
162 | # Check for GL and GLU needed for the raw event viewer
|
---|
163 | AC_CHECK_PACKAGE(GL, glLoadIdentity, GL, GL/gl.h, HAVE_GL=yes, HAVE_GL=no)
|
---|
164 | AC_CHECK_PACKAGE(GLU, gluNewTess, GLU, GL/glu.h, HAVE_GLU=yes, HAVE_GLU=no)
|
---|
165 |
|
---|
166 | # Check for libnova
|
---|
167 | AC_CHECK_PACKAGE(nova, ln_get_julian_from_sys, nova, libnova/julian_day.h, HAVE_NOVA=yes, HAVE_NOVA=no)
|
---|
168 |
|
---|
169 | # Taken from http://code.google.com/p/autoconf-gl-macros/
|
---|
170 | #AX_CHECK_GL
|
---|
171 | #AX_CHECK_GLU
|
---|
172 | #AX_CHECK_GLUT
|
---|
173 |
|
---|
174 | # Needed to compile FACT++
|
---|
175 | AC_CHECK_PACKAGE(cfitsio, ffpss, cfitsio, fitsio.h,
|
---|
176 | HAVE_CFITSIO=yes, HAVE_CFITSIO=no)
|
---|
177 |
|
---|
178 | #AC_CHECK_HEADERS([fitsio.h],,AC_MSG_ERROR([cfitsio headers not found]))
|
---|
179 | #AC_CHECK_LIB([cfitsio], main,,AC_MSG_ERROR([cfitsio library not found]))
|
---|
180 |
|
---|
181 | AC_LANG_POP(C)
|
---|
182 |
|
---|
183 | # Needed to compile FACT++
|
---|
184 | AC_CHECK_PACKAGE(ccfits, main, CCfits, CCfits/CCfits,
|
---|
185 | HAVE_CCFITS=yes, HAVE_CCFITS=no)
|
---|
186 |
|
---|
187 | #AC_CHECK_HEADERS([CCfits/CCfits],,
|
---|
188 | # AC_MSG_ERROR(CCfits headers not found))
|
---|
189 | #AC_CHECK_LIB(CCfits, main,,
|
---|
190 | # AC_MSG_ERROR(CCfits library not found))
|
---|
191 |
|
---|
192 | ######################################################################
|
---|
193 | # MySQL(++) SUPPORT
|
---|
194 | ######################################################################
|
---|
195 |
|
---|
196 | # Needed to compile FACT++
|
---|
197 | MYSQL_DEVEL
|
---|
198 | MYSQLPP_DEVEL
|
---|
199 |
|
---|
200 | LDFLAGS+=" -lmysqlpp"
|
---|
201 |
|
---|
202 | ######################################################################
|
---|
203 | # BOOST SUPPORT
|
---|
204 | ######################################################################
|
---|
205 |
|
---|
206 | # Needed to compile FACT++
|
---|
207 | AX_BOOST_BASE([1.40], [],
|
---|
208 | AC_MSG_ERROR([The boost C++ libraries (>=1.40) are not properly installed.])
|
---|
209 | )
|
---|
210 |
|
---|
211 | AC_MSG_CHECKING([for BOOST_CPPFLAGS])
|
---|
212 | AC_MSG_RESULT([$BOOST_CPPFLAGS])
|
---|
213 |
|
---|
214 | AC_MSG_CHECKING([for BOOST_LDFLAGS])
|
---|
215 | AC_MSG_RESULT([$BOOST_LDFLAGS])
|
---|
216 |
|
---|
217 | # Keep this order AX_BOOST_FILESYSTEM needs AX_BOOST_SYSTEM_LIB
|
---|
218 | AX_BOOST_SYSTEM
|
---|
219 | AS_IF([test "x$ax_cv_boost_system" != "xyes"],
|
---|
220 | AC_MSG_ERROR([Problems with the Boost::System libarary.]))
|
---|
221 |
|
---|
222 | AX_BOOST_ASIO
|
---|
223 | AS_IF([test "x$ax_cv_boost_asio" != "xyes"],
|
---|
224 | AC_MSG_ERROR([Problems with the Boost::ASIO libarary.]))
|
---|
225 |
|
---|
226 | AX_BOOST_DATE_TIME
|
---|
227 | AS_IF([test "x$ax_cv_boost_date_time" != "xyes"],
|
---|
228 | AC_MSG_ERROR([Problems with the Boost::Date_Time libarary.]))
|
---|
229 |
|
---|
230 | AX_BOOST_FILESYSTEM
|
---|
231 | AS_IF([test "x$ax_cv_boost_filesystem" != "xyes"],
|
---|
232 | AC_MSG_ERROR([Problems with the Boost::Filesystem libarary.]))
|
---|
233 |
|
---|
234 | AX_BOOST_PROGRAM_OPTIONS
|
---|
235 | AS_IF([test "x$ax_cv_boost_program_options" != "xyes"],
|
---|
236 | AC_MSG_ERROR([Problems with the Boost::Program_Options libarary.]))
|
---|
237 |
|
---|
238 | AX_BOOST_REGEX
|
---|
239 | AS_IF([test "x$ax_cv_boost_regex" != "xyes"],
|
---|
240 | AC_MSG_ERROR([Problems with the Boost::Regex libarary.]))
|
---|
241 |
|
---|
242 | AX_BOOST_THREAD
|
---|
243 | AS_IF([test "x$ax_cv_boost_thread" != "xyes"],
|
---|
244 | AC_MSG_ERROR([Problems with the Boost::Thread libarary.]))
|
---|
245 | #AX_BOOST_IOSTREAMS
|
---|
246 | #AX_BOOST_PYTHON
|
---|
247 | #AX_BOOST_SERIALIZATION
|
---|
248 | #AX_BOOST_SIGNALS
|
---|
249 | #AX_BOOST_TEST_EXEC_MONITOR
|
---|
250 | #AX_BOOST_UNIT_TEST_FRAMEWORK
|
---|
251 | #AX_BOOST_WAVE
|
---|
252 | #AX_BOOST_WSERIALIZATION
|
---|
253 |
|
---|
254 | LDFLAGS+=" "$BOOST_LDFLAGS
|
---|
255 | LDFLAGS+=" "$BOOST_SYSTEM_LIB
|
---|
256 | LDFLAGS+=" "$BOOST_ASIO_LIB
|
---|
257 | LDFLAGS+=" "$BOOST_DATE_TIME_LIB
|
---|
258 | LDFLAGS+=" "$BOOST_FILESYSTEM_LIB
|
---|
259 | LDFLAGS+=" "$BOOST_PROGRAM_OPTIONS_LIB
|
---|
260 | LDFLAGS+=" "$BOOST_REGEX_LIB
|
---|
261 | LDFLAGS+=" "$BOOST_THREAD_LIB
|
---|
262 |
|
---|
263 | CPPFLAGS+=" "$BOOST_CPPFLAGS
|
---|
264 |
|
---|
265 | # Now we can safely add the compiler option for your prefered standard
|
---|
266 | CXXFLAGS+=" -DTTTT -std=c++0x -DXXX "
|
---|
267 |
|
---|
268 | #AC_CHECK_HEADERS(
|
---|
269 | # [\
|
---|
270 | # boost/bind.hpp \
|
---|
271 | # boost/lexical_cast.hpp \
|
---|
272 | # boost/filesystem.hpp \
|
---|
273 | # boost/thread.hpp \
|
---|
274 | # boost/function.hpp \
|
---|
275 | # boost/regex.hpp \
|
---|
276 | # boost/asio.hpp \
|
---|
277 | # boost/enable_shared_from_this.hpp \
|
---|
278 | # boost/asio/deadline_timer.hpp \
|
---|
279 | # boost/date_time/posix_time/posix_time.hpp \
|
---|
280 | # boost/date_time/local_time/local_time.hpp \
|
---|
281 | # boost/date_time/gregorian/gregorian.hpp
|
---|
282 | # ], [],
|
---|
283 | # [
|
---|
284 | # echo "Error! At least one needed header of the boost C++ libararies is missing."
|
---|
285 | # exit -1
|
---|
286 | # ]
|
---|
287 | #)
|
---|
288 |
|
---|
289 | ######################################################################
|
---|
290 | # v8 / JavaScript
|
---|
291 | ######################################################################
|
---|
292 |
|
---|
293 | AC_CHECK_CLASS(v8, [v8::HandleScope handle_scope], v8, v8.h,
|
---|
294 | HAVE_V8=yes, HAVE_V8=no)
|
---|
295 |
|
---|
296 | ######################################################################
|
---|
297 | # QT4/GUI SUPPORT
|
---|
298 | ######################################################################
|
---|
299 |
|
---|
300 | AC_ARG_WITH([qt4],
|
---|
301 | [AS_HELP_STRING([--without-qt4], [Disable qt4, i.e. disable gui support.])],
|
---|
302 | [], [QT4_DO_IT_ALL])
|
---|
303 |
|
---|
304 | # This allows to list the QT4 stuff independantly later
|
---|
305 | CPPFLAGS+=" "${QT4_INCLUDES}" "
|
---|
306 | LDFLAGS+=" -lQtCore "
|
---|
307 | AC_CHECK_CLASS(QGL, [QGLWidget qgl], QtOpenGL, QtOpenGL/QGLWidget,
|
---|
308 | HAVE_QGL=yes, HAVE_QGL=no)
|
---|
309 | AC_CHECK_CLASS(qwt, [QwtPlot qwt], qwt-qt4, qwt_plot.h,
|
---|
310 | HAVE_QWT=yes, HAVE_QWT=no)
|
---|
311 |
|
---|
312 | ######################################################################
|
---|
313 | # ROOT SUPPORT
|
---|
314 | ######################################################################
|
---|
315 |
|
---|
316 | AC_ARG_WITH([root],
|
---|
317 | [AS_HELP_STRING([--without-root], [Disable root, i.e. disable gui support.])],
|
---|
318 | [], [ROOT_PATH([5.12/00])]
|
---|
319 | )
|
---|
320 |
|
---|
321 | if [test "$ROOTEXEC" != no -a -n "$ROOTVERSION"] ;
|
---|
322 | then
|
---|
323 |
|
---|
324 | ROOTCPPFLAGS=$ROOTCFLAGS
|
---|
325 | ROOTCXXFLAGS=$ROOTAUXCFLAGS
|
---|
326 | ROOTLDFLAGS="-L"$ROOTLIBDIR
|
---|
327 |
|
---|
328 | #AC_CHECK_PROG(HAVE_ROOT_QT, libGQt.so.$ROOTSOVERSION, yes, no, $ROOTLIBDIR)
|
---|
329 | #AC_CHECK_PROG(HAVE_GQT, libGQt.so.$ROOTSOVERSION, yes, no, $LD_LIBRARY_PATH)
|
---|
330 |
|
---|
331 | # It seems it dooesn't work on older root versions
|
---|
332 | ROOT_FEATURE([qt], [HAVE_ROOT_QT=yes])
|
---|
333 |
|
---|
334 | AC_SUBST(ROOTCPPFLAGS)
|
---|
335 | AC_SUBST(ROOTCXXFLAGS)
|
---|
336 | AC_SUBST(ROOTLDFLAGS)
|
---|
337 | fi
|
---|
338 |
|
---|
339 |
|
---|
340 | ######################################################################
|
---|
341 | # Check if we have colordiff to colorize 'svn diff'
|
---|
342 | ######################################################################
|
---|
343 |
|
---|
344 | # Nice to have to support colored diff
|
---|
345 | AC_CHECK_PROG(COLORDIFF, colordiff, colordiff, cat)
|
---|
346 | AC_CHECK_PROG(GROFF, groff, yes, no)
|
---|
347 | AC_CHECK_PROG(PS2PDF, ps2pdf, yes, no)
|
---|
348 | AC_CHECK_PROG(HELP2MAN, help2man, yes, no)
|
---|
349 | AC_CHECK_PROG(JSDOC, jsdoc, yes, no)
|
---|
350 | AC_CHECK_PROG(MAILX, mailx, yes, no)
|
---|
351 | AC_CHECK_PROG(CURL, curl, yes, no)
|
---|
352 |
|
---|
353 | ##########################################################################
|
---|
354 | # debug compilation support
|
---|
355 | ##########################################################################
|
---|
356 | #
|
---|
357 | #AC_MSG_CHECKING([whether to build with debug information])
|
---|
358 | #AC_ARG_ENABLE([debug],
|
---|
359 | # [AS_HELP_STRING([--enable-debug],
|
---|
360 | # [enable debug data generation (def=no)])],
|
---|
361 | # [debugit="$enableval"],
|
---|
362 | # [debugit=no])
|
---|
363 | #AC_MSG_RESULT([$debugit])
|
---|
364 | #
|
---|
365 | #if test x"$debugit" = x"yes"; then
|
---|
366 | # AC_DEFINE([DEBUG],[],[Debug Mode])
|
---|
367 | # AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Werror -Wno-uninitialized -O0"
|
---|
368 | #else
|
---|
369 | # AC_DEFINE([NDEBUG],[],[No-debug Mode])
|
---|
370 | # AM_CXXFLAGS="$AM_CXXFLAGS -O3"
|
---|
371 | #fi
|
---|
372 | #
|
---|
373 |
|
---|
374 | ##########################################################################
|
---|
375 | # produce conditionals for Makefile.am and for summary
|
---|
376 | ##########################################################################
|
---|
377 |
|
---|
378 | AM_CONDITIONAL(HAS_COLORDIFF, [test "$COLORDIFF" = colordiff])
|
---|
379 | AM_CONDITIONAL(HAS_GROFF, [test "$GROFF" = yes])
|
---|
380 | AM_CONDITIONAL(HAS_PS2PDF, [test "$PS2PDF" = yes])
|
---|
381 | AM_CONDITIONAL(HAS_HELP2MAN, [test "$HELP2MAN" = yes])
|
---|
382 | AM_CONDITIONAL(HAS_JSDOC, [test "$JSDOC" = yes])
|
---|
383 | AM_CONDITIONAL(HAS_MAILX, [test "$MAILX" = yes])
|
---|
384 | AM_CONDITIONAL(HAS_CURL, [test "$CURL" = yes])
|
---|
385 | AM_CONDITIONAL(HAS_DOXYGEN, [test "$DX_DOXYGEN"])
|
---|
386 | AM_CONDITIONAL(HAS_DOT, [test "$DX_DOT"])
|
---|
387 | AM_CONDITIONAL(HAS_COLORGCC, [test "$COLORGCC"])
|
---|
388 | AM_CONDITIONAL(HAS_QT4, [test "$QT4_VERSION"])
|
---|
389 | AM_CONDITIONAL(HAS_SQL, [test "$MYSQLPP_LIB_DIR" -a "$MYSQLPP_INC_DIR" ])
|
---|
390 | AM_CONDITIONAL(HAS_ROOT, [test "$ROOTEXEC" != no -a -n "$ROOTVERSION"])
|
---|
391 | AM_CONDITIONAL(HAS_ROOT_QT, [test "$HAVE_ROOT_QT" = yes])
|
---|
392 | AM_CONDITIONAL(HAS_CFITSIO, [test "$HAVE_CFITSIO" = yes])
|
---|
393 | AM_CONDITIONAL(HAS_CCFITS, [test "$HAVE_CCFITS" = yes])
|
---|
394 | AM_CONDITIONAL(HAS_FITS, [test "$HAVE_CFITSIO" = yes -a "$HAVE_CCFITS" = yes])
|
---|
395 | AM_CONDITIONAL(HAS_ZLIB, [test "$HAVE_ZLIB" = yes])
|
---|
396 | AM_CONDITIONAL(HAS_GL, [test "$HAVE_GL" = yes])
|
---|
397 | AM_CONDITIONAL(HAS_GLU, [test "$HAVE_GLU" = yes])
|
---|
398 | AM_CONDITIONAL(HAS_QGL, [test "$HAVE_QGL" = yes])
|
---|
399 | AM_CONDITIONAL(HAS_QWT, [test "$HAVE_QWT" = yes])
|
---|
400 | AM_CONDITIONAL(HAS_NOVA, [test "$HAVE_NOVA" = yes])
|
---|
401 | AM_CONDITIONAL(HAS_DBUS, [test "$HAVE_DBUS" = yes])
|
---|
402 | AM_CONDITIONAL(HAS_V8, [test "$HAVE_V8" = yes])
|
---|
403 |
|
---|
404 | AM_CONDITIONAL(HAS_GUI, [test "$QT4_VERSION" -a "$HAVE_GL" = yes -a "$HAVE_GLU" = yes -a "$HAVE_QGL" = yes -a "$HAVE_ROOT_QT" = yes ])
|
---|
405 | AM_CONDITIONAL(HAS_VIEWER, [test "$QT4_VERSION" -a "$HAVE_GL" = yes -a "$HAVE_GLU" = yes -a "$HAVE_QGL" = yes -a "$HAVE_QWT" = yes])
|
---|
406 |
|
---|
407 | AM_CONDITIONAL(IS_FALSE, [test "x" = "y"])
|
---|
408 | AM_CONDITIONAL(IS_TRUE, [test "x" = "x"])
|
---|
409 |
|
---|
410 | AM_COND_IF(HAS_FITS, [AC_DEFINE(HAVE_FITS)], )
|
---|
411 | AM_COND_IF(HAS_ROOT, [AC_DEFINE(HAVE_ROOT)], )
|
---|
412 | AM_COND_IF(HAS_ZLIB, [AC_DEFINE(HAVE_ZLIB)], )
|
---|
413 | AM_COND_IF(HAS_NOVA, [AC_DEFINE(HAVE_NOVA)], )
|
---|
414 | AM_COND_IF(HAS_DBUS, [AC_DEFINE(HAVE_DBUS)], )
|
---|
415 | AM_COND_IF(HAS_SQL, [AC_DEFINE(HAVE_SQL)], )
|
---|
416 | AM_COND_IF(HAS_V8, [AC_DEFINE(HAVE_V8)], )
|
---|
417 | AM_COND_IF(HAS_MAILX, [AC_DEFINE(HAVE_MAILX)],)
|
---|
418 | AM_COND_IF(HAS_CURL, [AC_DEFINE(HAVE_CURL)],)
|
---|
419 |
|
---|
420 | ##########################################################################
|
---|
421 | # print summary
|
---|
422 | ##########################################################################
|
---|
423 |
|
---|
424 | AC_OUTPUT
|
---|
425 |
|
---|
426 | AC_MSG_NOTICE()
|
---|
427 | AC_MSG_NOTICE(============================== summary =============================)
|
---|
428 | AC_MSG_NOTICE()
|
---|
429 | AC_MSG_NOTICE([ CFLAGS = $CFLAGS])
|
---|
430 | AC_MSG_NOTICE()
|
---|
431 | AC_MSG_NOTICE([ CXXFLAGS = $CXXFLAGS])
|
---|
432 | AC_MSG_NOTICE()
|
---|
433 | AC_MSG_NOTICE([ CPPFLAGS = $CPPFLAGS])
|
---|
434 | AC_MSG_NOTICE()
|
---|
435 | AC_MSG_NOTICE([ LDFLAGS = $LDFLAGS])
|
---|
436 | AC_MSG_NOTICE()
|
---|
437 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
438 | AC_MSG_NOTICE()
|
---|
439 | AC_MSG_NOTICE([ BOOST_CPPFLAGS = $BOOST_CPPFLAGS])
|
---|
440 | AC_MSG_NOTICE([ BOOST_LDFLAGS = $BOOST_LDFLAGS])
|
---|
441 | AC_MSG_NOTICE()
|
---|
442 | AM_COND_IF(HAS_SQL, [
|
---|
443 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
444 | AC_MSG_NOTICE()
|
---|
445 | AC_MSG_NOTICE([ MYSQLPP_INC_DIR = $MYSQLPP_INC_DIR])
|
---|
446 | AC_MSG_NOTICE([ MYSQLPP_LIB_DIR = $MYSQLPP_LIB_DIR])
|
---|
447 | AC_MSG_NOTICE()
|
---|
448 | ],[])
|
---|
449 | AM_COND_IF(HAS_QT4, [
|
---|
450 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
451 | AC_MSG_NOTICE()
|
---|
452 | AC_MSG_NOTICE([ QT4_VERSION = $QT4_VERSION])
|
---|
453 | AC_MSG_NOTICE()
|
---|
454 | AC_MSG_NOTICE([ QT4_LIB = $QT4_LIB])
|
---|
455 | AC_MSG_NOTICE([ QT4_LDFLAGS = $QT4_LDFLAGS])
|
---|
456 | AC_MSG_NOTICE([ QT4_INCLUDES = $QT4_INCLUDES])
|
---|
457 | AC_MSG_NOTICE()
|
---|
458 | AC_MSG_NOTICE([ MOC4 = $MOC4])
|
---|
459 | AC_MSG_NOTICE([ UIC4 = $UIC4])
|
---|
460 | AC_MSG_NOTICE([ RCC4 = $RCC4])
|
---|
461 | AC_MSG_NOTICE()
|
---|
462 | ],[])
|
---|
463 | AM_COND_IF(HAS_ROOT, [
|
---|
464 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
465 | AC_MSG_NOTICE()
|
---|
466 | AC_MSG_NOTICE([ ROOTVERSION = $ROOTVERSION])
|
---|
467 | AC_MSG_NOTICE()
|
---|
468 | AC_MSG_NOTICE([ ROOTEXEC = $ROOTEXEC])
|
---|
469 | AC_MSG_NOTICE([ ROOTCONF = $ROOTCONF])
|
---|
470 | AC_MSG_NOTICE([ ROOTCINT = $ROOTCINT])
|
---|
471 | AC_MSG_NOTICE([ ROOTCPPFLAGS = $ROOTCPPFLAGS])
|
---|
472 | AC_MSG_NOTICE([ ROOTCXXFLAGS = $ROOTCXXFLAGS])
|
---|
473 | AC_MSG_NOTICE()
|
---|
474 | ],[])
|
---|
475 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
476 | AC_MSG_NOTICE()
|
---|
477 | AC_MSG_NOTICE([ zlib / 'zlib.h' found: $HAVE_ZLIB])
|
---|
478 | AC_MSG_NOTICE([ nova / libnova.so found: $HAVE_NOVA])
|
---|
479 | AC_MSG_NOTICE([ v8 / 'v8.h' / libv8.so found: $HAVE_V8])
|
---|
480 | AC_MSG_NOTICE([ GL / GL/gl.h found: $HAVE_GL])
|
---|
481 | AC_MSG_NOTICE([ GLU / GL/glu.h found: $HAVE_GLU])
|
---|
482 | AC_MSG_NOTICE([ QtOpenGL / QtOpenGL/QGLWidget found: $HAVE_QGL])
|
---|
483 | AC_MSG_NOTICE([ Qwt / qwt_plot.h found: $HAVE_QWT])
|
---|
484 | AC_MSG_NOTICE([ cfitsio / 'fitsio.h' found: $HAVE_CFITSIO])
|
---|
485 | AC_MSG_NOTICE([ CCfits / 'CCfits/CCfits' found: $HAVE_CCFITS])
|
---|
486 | AM_COND_IF(HAS_SQL,
|
---|
487 | AC_MSG_NOTICE([ MySQL/MySQL++ / 'mysql++.h' found: yes]),
|
---|
488 | AC_MSG_NOTICE([ MySQL/MySQL++ / 'mysql++.h' found: no])
|
---|
489 | )
|
---|
490 | AC_MSG_NOTICE([ DBus-1, DBus-glib-1 / pkg-config found: $HAVE_DBUS])
|
---|
491 | AM_COND_IF(HAS_LIBXP,
|
---|
492 | AC_MSG_NOTICE([ Motif/lesstif / 'Xm/Xm.h' 'libXp' found: yes]),
|
---|
493 | AC_MSG_NOTICE([ Motif/lesstif / 'Xm/Xm.h' 'libXp' found: no])
|
---|
494 | )
|
---|
495 | AM_COND_IF(HAS_COLORDIFF,
|
---|
496 | AC_MSG_NOTICE([ colored svn diff / 'colordiff' found: yes]),
|
---|
497 | AC_MSG_NOTICE([ colored svn diff / 'colordiff' found: no])
|
---|
498 | )
|
---|
499 | AM_COND_IF(HAS_JSDOC,
|
---|
500 | AC_MSG_NOTICE([ JavaScript docu / 'jsdoc' found: yes]),
|
---|
501 | AC_MSG_NOTICE([ JavaScript docu / 'jsdoc' found: no])
|
---|
502 | )
|
---|
503 | AM_COND_IF(HAS_V8,[
|
---|
504 | AM_COND_IF(HAS_MAILX,
|
---|
505 | AC_MSG_NOTICE([ Mail support / 'mailx' found: yes]),
|
---|
506 | AC_MSG_NOTICE([ Mail support / 'mailx' found: no])
|
---|
507 | )
|
---|
508 | AM_COND_IF(HAS_CURL,
|
---|
509 | AC_MSG_NOTICE([ Curl support / 'curl' found: yes]),
|
---|
510 | AC_MSG_NOTICE([ Curl support / 'curl' found: no])
|
---|
511 | )
|
---|
512 | ])
|
---|
513 |
|
---|
514 | AM_COND_IF(HAS_HELP2MAN,[
|
---|
515 | AC_MSG_NOTICE([ man-pages enabled / 'help2man' found: $HELP2MAN])
|
---|
516 | AM_COND_IF(HAS_GROFF,
|
---|
517 | AC_MSG_NOTICE([ build of html enabled / 'groff' found: yes])
|
---|
518 | AC_MSG_NOTICE([ build of pdf enabled / 'ps2pdf' found: $PS2PDF]),
|
---|
519 | AC_MSG_NOTICE([ build of html and pdf / 'groff' found: no])
|
---|
520 | )
|
---|
521 | ],[
|
---|
522 | AC_MSG_NOTICE([ man, html, pdf enabled / 'help2man' found: no])
|
---|
523 | ])
|
---|
524 |
|
---|
525 | AM_COND_IF(HAS_DOXYGEN,
|
---|
526 | AC_MSG_NOTICE([ doxygen docu enabled / 'doxygen' found: $DX_DOXYGEN]),
|
---|
527 | AC_MSG_NOTICE([ doxygen docu enabled / 'doxygen' found: no])
|
---|
528 | )
|
---|
529 | AM_COND_IF(HAS_DOT,
|
---|
530 | AC_MSG_NOTICE([ doxygen graphs enabled / 'dot' (graphviz) found: $DX_DOT]),
|
---|
531 | AC_MSG_NOTICE([ doxygen graphs enabled / 'dot' (graphviz) found: no])
|
---|
532 | )
|
---|
533 | AM_COND_IF(HAS_QT4,
|
---|
534 | AC_MSG_NOTICE([ QT4 support enabled / QT4 toolkit found: yes]),
|
---|
535 | AC_MSG_NOTICE([ QT4 support enabled / QT4 toolkit found: no])
|
---|
536 | )
|
---|
537 | AC_MSG_NOTICE([ ROOT support enabled / root >= 5.12/00 found: $ROOTEXEC])
|
---|
538 | AM_COND_IF(HAS_ROOT_QT,
|
---|
539 | AC_MSG_NOTICE([ ROOT built with --with-qt found: yes]),
|
---|
540 | AC_MSG_NOTICE([ ROOT built with --with-qt found: no])
|
---|
541 | )
|
---|
542 | AC_MSG_NOTICE()
|
---|
543 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
544 | AC_MSG_NOTICE()
|
---|
545 | AC_MSG_NOTICE([Suggestions and hints:])
|
---|
546 | AC_MSG_NOTICE()
|
---|
547 | AC_MSG_NOTICE([ - Add 'V=1' to you make-call to switch on verbose output.])
|
---|
548 | AC_MSG_NOTICE([ - Do not try to create man-pages with doxygen,])
|
---|
549 | AC_MSG_NOTICE([ it does most probably not work.])
|
---|
550 | AM_COND_IF(HAS_COLORGCC,,
|
---|
551 | AC_MSG_NOTICE([ - Install colorgcc to get colored compiler output.])
|
---|
552 | )
|
---|
553 | AC_MSG_NOTICE([ - If you send me a bug report about:])
|
---|
554 | AC_MSG_NOTICE([ + configure: please attach the file config.log])
|
---|
555 | AC_MSG_NOTICE([ + make: please send me the output of 'make V=1'])
|
---|
556 | AC_MSG_NOTICE()
|
---|
557 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
558 | AC_MSG_NOTICE()
|
---|
559 | AC_MSG_NOTICE([Some interesting build targets:])
|
---|
560 | AC_MSG_NOTICE()
|
---|
561 | AC_MSG_NOTICE([ diff: colored 'svn diff' if colordiff is installed])
|
---|
562 | AM_COND_IF(HAS_HELP2MAN,[
|
---|
563 | AC_MSG_NOTICE([ program.man: build man-page from 'program --help'])
|
---|
564 | AC_MSG_NOTICE([ (display with 'man ./program.man')])
|
---|
565 | AM_COND_IF(HAS_GROFF,[
|
---|
566 | AC_MSG_NOTICE([ program.html: build html page from man-page])
|
---|
567 | AM_COND_IF(HAS_PS2PDF,
|
---|
568 | AC_MSG_NOTICE([ program.pdf: build pdf documentation from man page])
|
---|
569 | )
|
---|
570 | ])
|
---|
571 | ])
|
---|
572 | AM_COND_IF(HAS_DOXYGEN,
|
---|
573 | AC_MSG_NOTICE([ doxygen-run: build html documentation with doxygen])
|
---|
574 | # AC_MSG_NOTICE([ doxygen-doc: build html and pdf documentation with doxygen])
|
---|
575 | )
|
---|
576 | AM_COND_IF(HAS_JSDOC,
|
---|
577 | AC_MSG_NOTICE([ jsdoc: build JavaScript documentation with jsdoc])
|
---|
578 | )
|
---|
579 | AC_MSG_NOTICE([ doc: build all buildable documentation])
|
---|
580 | AC_MSG_NOTICE()
|
---|
581 | AC_MSG_NOTICE(--------------------------------------------------------------------)
|
---|
582 | AC_MSG_NOTICE()
|
---|
583 | AM_COND_IF(HAS_ZLIB,,
|
---|
584 | AC_MSG_WARN([ zlib not found. Support for reading .fits.gz disabled.])
|
---|
585 | )
|
---|
586 | AM_COND_IF(HAS_LIBXP,,
|
---|
587 | AC_MSG_WARN([ Motif/lesstif not found. The dim gui did will not be built!])
|
---|
588 | )
|
---|
589 | AM_COND_IF(HAS_FITS,,
|
---|
590 | AC_MSG_WARN([ FITS support disabled. cfitsio/CCfits missing!])
|
---|
591 | )
|
---|
592 | AM_COND_IF(HAS_ROOT,
|
---|
593 | [AM_COND_IF(HAS_ROOT_QT,,
|
---|
594 | AC_MSG_WARN([ root found but it was built without the --with-qt option])
|
---|
595 | )],
|
---|
596 | AC_MSG_WARN([ root not found - ROOT support disabled.])
|
---|
597 | )
|
---|
598 | AM_COND_IF(HAS_QT4,, AC_MSG_WARN([ QT4 missing - GUIs disabled!]))
|
---|
599 | AM_COND_IF(HAS_GL,, AC_MSG_WARN([ GL not found - GUIs will be disabled.]))
|
---|
600 | AM_COND_IF(HAS_GLU,, AC_MSG_WARN([ GLU not found - GUIs will be disabled.]))
|
---|
601 | AM_COND_IF(HAS_QGL,, AC_MSG_WARN([ QtOpenGl not found - GUIs will be disabled.]))
|
---|
602 | AM_COND_IF(HAS_QWT,, AC_MSG_WARN([ Qwt not found - viewer will be disabled.]))
|
---|
603 | AM_COND_IF(HAS_GUI, [],
|
---|
604 | AC_MSG_WARN([ Either of the necessary packages not found - fact GUI disabled!])
|
---|
605 | )
|
---|
606 | AM_COND_IF(HAS_VIEWER, [],
|
---|
607 | AC_MSG_WARN([ Either of the necessary packages not found - viewer GUI disabled!])
|
---|
608 | )
|
---|
609 | AM_COND_IF(HAS_JSDOC,, AC_MSG_WARN([ JavaScript documentation disabled!]))
|
---|
610 | AM_COND_IF(HAS_MAILX,, AC_MSG_WARN([ Mail functionality in JavaScript disabled!]))
|
---|
611 | AM_COND_IF(HAS_CURL,, AC_MSG_WARN([ Curl functionality in JavaScript disabled!]))
|
---|
612 | AM_COND_IF(HAS_SQL,, AC_MSG_WARN([ database support globally disabled!]))
|
---|
613 | AM_COND_IF(HAS_NOVA,, AC_MSG_WARN([ libnova missing - smartfact will be compiles without astronomy support!]))
|
---|
614 | AM_COND_IF(HAS_V8,, AC_MSG_WARN([ libv8 missing - JavaScript support will be disabled!]))
|
---|
615 | AM_COND_IF(HAS_DBUS,, AC_MSG_WARN([ DBus libraries missing - skypeclient will not be compiled!]))
|
---|
616 | AC_MSG_NOTICE()
|
---|