a14021d13daa0d11a0b9cc506494421b1fcd3c17
[terminatorX.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/tX_global.h)
3 AM_INIT_AUTOMAKE(terminatorX, 3.80)
4 AM_CONFIG_HEADER(config.h)
5
6 dnl AC_ARG_ENABLE(closedev, [  --enable-closedev       close audio device if not in use. [default=yes] ])
7 AC_ARG_ENABLE(sox, [  --enable-sox            use sox as input converter. (default=auto) ])
8 AC_ARG_ENABLE(mpg123, [  --enable-mpg123         use mpg123 as input converter. (default=auto) ])
9 AC_ARG_ENABLE(ogg123, [  --enable-ogg123         use ogg123 as input converter. (default=auto) ])
10 dnl AC_ARG_ENABLE(wavonly,  [  --enable-wavonly        enable the builtin wav routines. ])
11 dnl AC_ARG_ENABLE(scheduler,[  --enable-scheduler      enable rt-scheduling (req. root-priv). (default=yes) ])
12 AC_ARG_ENABLE(debug,    [  --enable-debug          enable debug output. (default=no) ])
13 dnl AC_ARG_ENABLE(3dnow,    [  --enable-3dnow          enables 3DNow! support. (default=no) ])
14 dnl AC_ARG_ENABLE(benchmark,[  --enable-benchmark      creates a non-functional test version (default=no) ])
15 AC_ARG_ENABLE(wav,          [  --enable-wav            enables the builtin wav-loader (default=yes) ])
16 AC_ARG_ENABLE(xsetpointer,  [  --enable-xsetpointer    enables executing of xsetpointer (default=auto) ])
17 AC_ARG_ENABLE(alsa,         [  --enable-alsa           use ALSA for sound output (default=auto) ])
18 AC_ARG_ENABLE(oss,          [  --enable-oss            use OSS for sound output (default=auto) ])
19 dnl AC_ARG_ENABLE(movqfix,          [  --disable-movqfix       don't use movq fix for gcc >= 2.96 [default=on] ])
20 dnl AC_ARG_ENABLE(dga2,     [  --enable-dga2           use DGA2 instead of DGA1. (experimental) (default=no) ])
21 AC_ARG_ENABLE(libxml2,      [  --disable-libxml2       use libxml even if verion 2 detected (default=auto) ])
22 AC_ARG_ENABLE(mad,              [  --disable-mad           disable mad for mp3 support (default=auto) ])
23 AC_ARG_ENABLE(vorbis,   [  --disable-vorbis        disable libvorbis support (default=auto) ])
24 AC_ARG_ENABLE(audiofile,        [  --disable-audiofile     disable audiofile support (default=auto) ])
25 AC_ARG_ENABLE(legacy,           [  --disable-legacy        disable support for old terminatorX files (default=on) ])
26 AC_ARG_ENABLE(alsamidi,         [  --disable-alsamidi      disable support  ALSA MIDI in (default=auto) ])
27 AC_ARG_ENABLE(lrdf,                     [  --disable-lrdf          disable support for liblrdf (default=auto) ])
28 AC_ARG_WITH(docdir,             [  --with-docdir=/some/dir the final location the docs will be installed to. ])
29
30 dnl Checks for programs.
31 AC_PROG_AWK
32 AC_PROG_CC
33 AC_PROG_CXX
34 AC_PROG_INSTALL
35 AC_PROG_LN_S
36 AC_PROG_RANLIB
37
38 OPTION_SOX="no"
39 OPTION_MPG123="no"
40 OPTION_MAD="no"
41 OPTION_OGG123="no"
42 OPTION_VORBIS="no"
43 OPTION_AUDIOFILE="no"
44 OPTION_WAV="no"
45 OPTION_GNOME="no"
46 OPTION_SCHEDULER="no"
47 OPTION_ALSAMIDI="no"
48 OPTION_LEGACY="no"
49 OPTION_LRDF="no"
50
51 dnl Checks for libraries.
52 AC_CHECK_LIB(m, floor,, AC_MSG_ERROR([** math-lib not installed or broken **]))
53
54 dnl Checking whether -pthreads, -lpthreads or simply nothing
55
56 tX_threads=no
57
58 dnl Some machines don't require any switches for pthread support...
59
60 AC_MSG_CHECKING([whether pthreads works without switches])
61         no_threads_flags=no
62         AC_LANG_SAVE
63         AC_LANG_C
64         AC_TRY_LINK([#include <pthread.h>], [ pthread_t thread; pthread_create(&thread, NULL, NULL, NULL);],
65                 no_threads_flags=yes,
66                 no_threads_flags=no
67         )
68         AC_LANG_RESTORE
69 AC_MSG_RESULT([$no_threads_flags])
70
71 if test "$no_threads_flags" = "yes"; then
72         tX_threads=auto
73 fi
74
75 dnl Some machines prefer the -lpthread...
76
77 if test "$tX_threads" = "no"; then
78         pthread_lib=no
79         AC_CHECK_LIB(pthread, pthread_detach, pthread_lib=yes, pthread_lib=no)
80         
81         if test "$pthread_lib" = "yes"; then
82                 tX_threads=lpthread
83                 LIBS="$LIBS -lpthread"
84         fi
85 fi
86
87 dnl Some machines prefer a -pthread...
88
89 if test "$tX_threads" = "no"; then
90         AC_MSG_CHECKING([whether -pthread is required for pthreads])
91                 use_gcc_threads=no
92                 ac_save_CFLAGS=$CFLAGS
93                 CFLAGS="$CFLAGS -pthread"
94                 AC_LANG_SAVE
95                 AC_LANG_C
96                 AC_TRY_LINK([#include <pthread.h>], [ pthread_t thread; pthread_create(&thread, NULL, NULL, NULL);],
97                         use_gcc_threads=yes,
98                         use_gcc_threads=no
99                 )
100                 AC_LANG_RESTORE
101                 CFLAGS=$ac_save_CFLAGS
102         AC_MSG_RESULT([$use_gcc_threads])
103         
104         if test "$use_gcc_threads" = "yes"; then
105                 tX_threads=gcc
106                 CFLAGS="$CFLAGS -pthread"
107         fi
108 fi
109
110 dnl If we still haven't found pthreads, we panic...
111
112 if test "$tX_threads" = "no"; then
113         AC_MSG_ERROR([** failed to detect pthreads implementation **])
114 fi
115
116 AM_PATH_GTK_2_0(, [
117   GTK2_CFLAGS="$GTK_CFLAGS"
118   GTK2_LIBS="$GTK_LIBS"
119   gtk2="yes"
120   GTK2_VERSION="`$PKG_CONFIG --modversion gtk+-2.0`"], [ gtk2="yes" ]) 
121   OPTION_GTK_VERSION="Version 2 - ($GTK2_VERSION)"
122
123 if test "$gtk2" = "no"; then
124         AC_MSG_ERROR([** couldn't find gtk+ > Version 2. Please upgrade (http://www.gtk.org). **])
125 fi
126
127 dnl Checks for header files.
128 AC_HEADER_STDC
129 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h unistd.h)
130
131 dnl Disable LADSPA caching..
132 unset ac_cv_header_ladspa_h
133
134 have_ladspa=no
135 AC_CHECK_HEADERS(ladspa.h, have_ladspa=yes, have_ladspa=no)
136
137 dnl Disable LADSPA caching..
138 unset ac_cv_header_ladspa_h
139
140 dnl Some people install LADSPA in /usr/local
141
142 if test "$have_ladspa" = "no"; then
143         ac_save_CFLAGS=$CFLAGS
144         CFLAGS="$CFLAGS -I/usr/local/include"
145         AC_CHECK_HEADERS(ladspa.h, have_ladspa=yes, have_ladspa=no)
146         CFLAGS=$ac_save_CFLAGS
147         
148         if test "$have_ladspa" = "yes"; then
149                 CFLAGS="$CFLAGS -I/usr/local/include"
150         fi
151 fi
152
153 if test "$have_ladspa" = "no"; then
154         AC_MSG_ERROR([** couldn't find ladspa.h - Install the LADSPA SDK from http://www.ladspa.org first. **])
155 fi
156
157 dnl Checks for typedefs, structures, and compiler characteristics.
158 AC_C_BIGENDIAN
159 AC_TYPE_SIZE_T
160
161 dnl Checks for library functions.
162 AC_PROG_GCC_TRADITIONAL
163
164 dnl Eval args
165 if test "$enable_closedev" = "no"; then
166         AC_DEFINE_UNQUOTED([KEEP_DEV_OPEN], 1, [Define if you want keep device open])
167 fi
168
169
170 if test "$enable_sox" != "no"; then
171         AC_CHECK_PROG(SOX_PROG, sox, yes)
172         if test "$SOX_PROG" = "yes"; then
173                 AC_DEFINE_UNQUOTED([USE_SOX_INPUT], 1, [Define if you want to use sox as input converter])
174                 OPTION_SOX="yes"
175         fi
176 fi
177
178 if test "$enable_mad" != "no"; then
179         AC_CHECK_HEADERS(mad.h,madheader=yes,madheader=no)
180         if test "$madheader" = "yes"; then
181                 AC_CHECK_LIB(mad,mad_decoder_init,madlib=yes,madlib=no)
182                 if test "$madlib" = "yes"; then
183                         LIBS="$LIBS -lmad"
184                         AC_DEFINE_UNQUOTED([USE_MAD_INPUT], 1, [Define to use MAD for mp3 support])
185                         OPTION_MAD="yes"
186                 fi
187         fi
188 fi
189
190 if test "$enable_vorbis" != "no"; then
191         AC_CHECK_HEADERS(vorbis/codec.h vorbis/vorbisfile.h,vorbis_headers=yes,vorbis_headers="no")
192         if test "$vorbis_headers" = "yes"; then
193                 AC_CHECK_LIB(vorbis,vorbis_info_init,vorbis_libs=yes,vorbis_libs=no)
194                 if test "$vorbis_libs" = "yes"; then
195                         PREV_LIBS=LIBS
196                         LIBS="$LIBS -lvorbis"
197                         AC_CHECK_LIB(vorbisfile,ov_open_callbacks,vorbisfile_libs=yes,vorbisfile_libs=no)
198                         if test "$vorbisfile_libs" = "yes"; then
199                                 LIBS="$LIBS -lvorbisfile"
200                                 AC_DEFINE_UNQUOTED([USE_VORBIS_INPUT], 1, [Define to use libvorbis for ogg support])
201                                 OPTION_VORBIS="yes"
202                         else
203                                 LIBS=PREV_LIBS
204                         fi
205                 fi
206         fi
207 fi
208
209 if test "$enable_audiofile" != "no"; then
210         AC_CHECK_PROG(af_config,audiofile-config,yes,no)
211         if test "$af_config" = "yes"; then
212                 af_cflags=`audiofile-config --cflags`
213                 if test "$af_cflags" != ""; then
214                         CFLAGS="$CFLAGS $af_cflags"
215                 fi
216                 af_libs=`audiofile-config --libs`
217                 LIBS="$LIBS $af_libs"
218                 AC_DEFINE_UNQUOTED([USE_AUDIOFILE_INPUT], 1, [Define to compile libaudiofile support])
219                 OPTION_AUDIOFILE="yes"
220         else
221                 AC_CHECK_HEADERS(audiofile.h,audiofile_headers=yes,audiofile_headers=no)
222                 if test "$audiofile_headers" = "yes"; then
223                         AC_CHECK_LIB(audiofile,afOpenFile,audiofile_libs=yes,audiofile_libs=no)
224                         if test "$audiofile_libs" = "yes"; then
225                                 LIBS="$LIBS -laudiofile"
226                                 AC_DEFINE_UNQUOTED([USE_AUDIOFILE_INPUT], 1, [Define to compile libaudiofile support])
227                                 OPTION_AUDIOFILE="yes"
228                         fi
229                 fi
230         fi
231 fi
232
233 if test "$enable_mpg123" != "no"; then
234         AC_CHECK_PROG(MPG123_PROG, mpg123, yes)
235         if test "$MPG123_PROG" = "yes"; then
236                 if test "$SOX_PROG" = "yes"; then       
237                         AC_DEFINE_UNQUOTED([USE_MPG123_INPUT], 1, [Define mp3-input through mpg123 - requires sox as well])
238                         OPTION_MPG123="yes"
239                 else
240                         AC_CHECK_PROG(SOX_PROG, sox, yes)
241                         if test "$SOX_PROG" = "yes"; then       
242                                 AC_DEFINE_UNQUOTED([USE_MPG123_INPUT], 1, [Define mp3-input through mpg123 - requires sox as well])
243                                 OPTION_MPG123="yes"
244                         else
245                                 AC_MSG_RESULT([** mpg123 support disabled: couldn't find sox! **])
246                         fi
247                 fi
248         fi
249 fi
250
251 if test "$enable_ogg123" != "no"; then
252         AC_CHECK_PROG(OGG123_PROG, ogg123, yes)
253         if test "$OGG123_PROG" = "yes"; then
254                 AC_DEFINE_UNQUOTED([USE_OGG123_INPUT], 1, [Define if you want UGLY ogg-input "support" - also requires sox])
255                 OPTION_OGG123="yes"
256         fi
257 fi
258
259 if test "$enable_xsetpointer" != "no"; then
260         AC_CHECK_PROG(XSETPOINTER_PROG, xsetpointer, yes)
261         if test "$XSETPOINTER_PROG" = "yes"; then
262                 AC_DEFINE_UNQUOTED([USE_XSETPOINTER], 1, [Exec xsetpointer instead of using Xlib-calls.])
263         else
264                 if test "$enable_xsetpointer" = "yes"; then
265                         AC_MSG_ERROR([** xsetpointer not found. **])
266                 fi
267         fi
268 fi
269
270 if test "$enable_movqfix" = "no"; then
271         AC_DEFINE_UNQUOTED([OVERRIDE_MOVQ_AUTODETECT], 1, [Don't use movqfix])
272 fi
273
274 using_alsa=no
275 using_oss=no
276
277 if test "$enable_alsa" != "no"; then
278     AC_CHECK_LIB(asound, snd_pcm_writei,alsalib=yes,alsalib=no)
279     AC_CHECK_HEADERS(alsa/asoundlib.h,alsaheader=yes,alsaheader=no)
280
281     if test "$alsalib" = "yes"; then
282             if test "$alsaheader" = "yes"; then
283                     AC_DEFINE_UNQUOTED([USE_ALSA], 1, [ Define to use ALSA audio backend instead of OSS.])
284                     LIBS="$LIBS -lasound"
285                     using_alsa=yes;
286             else 
287                     if test "$enable_alsa" = "yes"; then
288                             AC_MSG_ERROR([** Coulnd't find ALSA header file sys/asoundlib.h **])
289                     fi
290             fi
291     else
292             if test "$enable_alsa" = "yes"; then
293                     AC_MSG_ERROR([** Coulnd'f find ALSA library libasound. **])
294             fi
295     fi
296 fi
297
298 if test "$enable_oss" != "no"; then
299         AC_CHECK_HEADERS(sys/ioctl.h sys/soundcard.h,oss=yes,oss=no)
300         
301         if test "$oss" = "yes"; then
302                 AC_DEFINE_UNQUOTED([USE_OSS], 1, [Use OSS])
303                 using_oss=yes;
304         else
305                 if test "$enable_oss" = "yes"; then
306                         AC_MSG_ERROR([** Couldn't find OSS header files. ***])
307                 fi
308         fi
309 fi
310
311 if test "$enable_alsamidi" != "no"; then
312         if test "$using_alsa" = "yes"; then
313                 AC_DEFINE_UNQUOTED([USE_ALSA_MIDI_IN], 1, [Define for ALSA MIDI in support])
314                 OPTION_ALSAMIDI="yes"                           
315         else
316                 AC_CHECK_LIB(asound, snd_seq_open,alsalib=yes,alsalib=no)
317                 AC_CHECK_HEADERS(alsa/asoundlib.h,alsaheader=yes,alsaheader=no)
318
319                 if test "$alsalib" = "yes"; then
320                         if test "$alsaheader" = "yes"; then
321                                 AC_DEFINE_UNQUOTED([USE_ALSA_MIDI_IN], 1, [Define for ALSA MIDI in support])
322                                 LIBS="$LIBS -lasound"
323                                 OPTION_ALSAMIDI="yes"
324                         else 
325                                 if test "$enable_alsamidi" = "yes"; then
326                                         AC_MSG_ERROR([** Coulnd't find ALSA header file alsa/asoundlib.h **])
327                                 fi
328                         fi
329                 else
330                         if test "$enable_alsamidin" = "yes"; then
331                                 AC_MSG_ERROR([** Couldn't find ALSA library libasound. **])
332                         fi
333                 fi
334         fi
335 fi
336
337 if test "$using_alsa" = "yes"; then
338         AC_MSG_RESULT([termnatorX audiodevice: using ALSA.])
339         AC_DEFINE_UNQUOTED([USE_ALSA], 1, [Define for ALSA pcm output])
340 else 
341         if test "$using_oss" = "yes"; then
342                 AC_MSG_RESULT([termnatorX audiodevice: using OSS.])
343         fi
344 fi
345
346 if test "$using_alsa" != "yes"; then
347         if test "$using_oss" != "yes"; then
348                 AC_MSG_ERROR([** Found neither OSS nor ALSA! **])
349         fi
350 fi      
351         
352 if test "$enable_wav" != "no";
353 then
354         AC_DEFINE_UNQUOTED([USE_BUILTIN_WAV], 1, [Define to enable the built-in wav loading routines])
355         OPTION_WAV="yes"
356 fi
357
358 dnl if test "$enable_flash" = "no"; then
359 dnl     AC_DEFINE(DONT_USE_FLASH)
360 dnl fi 
361
362 if test "$enable_3dnow" = "yes"; then
363         AC_DEFINE_UNQUOTED([USE_3DNOW], 1, [Do not define this])
364 fi 
365
366 if test "$enable_scheduler" != "no"; then
367         OPTION_SCHEDULER="yes";
368         AC_DEFINE_UNQUOTED([USE_SCHEDULER], 1, [Define this to compile with rt scheduling support])
369 fi
370
371 if test "$enable_debug" = yes; then
372         AC_DEFINE_UNQUOTED([ENABLE_DEBUG_OUTPUT], 1, [Define this to enable debug output.])
373 fi
374
375 if test "$enable_benchmark" = yes; then
376         AC_DEFINE_UNQUOTED([CREATE_BENCHMARK], 1, [Define this to build an performance benchmark - WARNING: You cannot use the resulting binary for normal operation])
377 fi
378
379 dnl AC_MSG_CHECKING(whether to use dials)
380 dnl if test "$enable_dial" = no; then
381 dnl     AC_MSG_RESULT(no)
382 dnl else
383 dnl     AC_MSG_RESULT(yes)
384         AC_DEFINE_UNQUOTED([USE_DIAL], 1, [Keep this defined])
385 dnl fi
386
387 AC_MSG_CHECKING(for necessary scratching skillz)
388 AC_MSG_RESULT(yes)
389
390 dnl if test "$enable_bigdial" = yes; then
391 dnl     AC_DEFINE(USE_DIAL)
392 dnl     AC_DEFINE(USE_BIG_BUTTONS)
393 dnl fi
394
395 if test "$enable_legacy" != no; then
396         AC_DEFINE_UNQUOTED([ENABLE_TX_LEGACY], 1, [Define this to enable support for old tX set files])
397         OPTION_LEGACY="yes"
398 fi
399
400 dnl if test "$enable_dga2" = yes; then
401 dnl     AC_DEFINE(USE_DGA2)
402 dnl fi
403
404 AC_MSG_CHECKING(for GNOME)
405         AC_MSG_RESULT([in progress])
406         AC_CHECK_PROG(gnomepresent, gnome-name-service, yes, no)
407         if test "$gnomepresent" = yes; then
408                 AC_CHECK_PROG(gnomeconfig, gnome-config, yes)
409                 if test "$gnomeconfig" = yes; then
410                         gnomedatadir=`gnome-config --datadir`
411                 else
412                         gnomedatadir=${datadir}
413                 fi
414                 AC_SUBST(gnomedatadir)
415                 AM_CONDITIONAL(GNOMEpresent, test "$gnomepresent" = yes)
416                 AC_MSG_RESULT([Found GNOME - installing terminatorX.desktop.])
417                 OPTION_GNOME="yes"
418         else
419                 AC_MSG_RESULT([GNOME not found.])
420         fi
421
422
423 dnl Detecting libxml. Based on dia's test.
424 found_libxml=false
425
426 if test "$enable_libxml2" != "no"; then
427         if ! $found_libxml; then
428           AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config)
429           if test "x$XML2_CONFIG" != x ; then
430             AC_MSG_CHECKING(for libxml >= 2.3.9)
431             vers=`$XML2_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
432
433             if test "$vers" -ge 2003009; then
434               AC_MSG_RESULT(yes)
435               found_libxml=true
436               XML_LIBS="`$XML2_CONFIG --libs`"
437               XML_CFLAGS="`$XML2_CONFIG --cflags`"
438             else
439               AC_MSG_RESULT(no)
440             fi
441           fi
442         fi
443 fi      
444
445 if ! $found_libxml 
446 then
447         AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config)
448         if test "x$XML_CONFIG" != x ; then
449           AC_MSG_CHECKING(for libxml >= 1.8.14)
450           vers=`$XML_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
451
452           dnl 1.18.14 is required for xmlUseNewParser()    
453           if test "$vers" -ge 1008014; then
454             AC_MSG_RESULT(yes)
455             found_libxml=true
456             XML_LIBS="`$XML_CONFIG --libs`"
457             XML_CFLAGS="`$XML_CONFIG --cflags`"
458           else
459             AC_MSG_RESULT(no)
460           fi
461         fi
462 fi
463
464 if ! $found_libxml; then
465     AC_MSG_ERROR([** libxml not found. Get libxml(2) at http://www.libxml.org **])
466 fi
467
468 AC_SUBST(XML_LIBS)
469 AC_SUBST(XML_CFLAGS)
470
471 if test "$prefix" != "NONE"; then
472         xml_man="\\\"$datadir/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
473 else
474         xml_man="\\\"/usr/local/share/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
475 fi
476
477 if test "$with_docdir" != ""; then
478         xml_man="\\\"$with_docdir/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml\\\""
479 fi
480
481 if test "$enable_lrdf" != "no"; then
482     AC_MSG_CHECKING(for liblrdf >= 0.2.4)
483         LRDF_VERS=`$PKG_CONFIG --modversion lrdf | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
484         if test "$LRDF_VERS" -ge 2004; then
485                 AC_MSG_RESULT(yes)
486                 OPTION_LRDF=yes
487
488                 lrdf_cflags=`$PKG_CONFIG --cflags lrdf`
489                 if test "$lrdf_cflags" != ""; then
490                         CFLAGS="$CFLAGS $lrdf_cflags"
491                 fi
492                 lrdf_libs=`$PKG_CONFIG --libs lrdf`
493                 LIBS="$LIBS $lrdf_libs"
494                 AC_DEFINE_UNQUOTED([USE_LRDF], 1, [Define to compile librdf support])
495                 OPTION_AUDIOFILE="yes"
496         else
497                 AC_MSG_RESULT(no)
498         fi
499
500 fi
501
502 dnl Scrollkeeper
503 AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
504 if test x$SK_CONFIG = xno; then
505   AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
506 fi
507
508 dnl Now Check for Xlibs - I do this here as other tests fail if these run earlier
509 AC_PATH_XTRA
510
511 AC_SUBST(X_CFLAGS)
512 AC_SUBST(X_PRE_LIBS)
513 AC_SUBST(X_EXTRA_LIBS)
514 AC_SUBST(X_LIBS)
515 AC_SUBST(x_libraries)
516
517 GTK_LIBS="$GTK_LIBS $X_LIBS"
518 AC_CHECK_LIB(X11, XOpenDisplay,, AC_MSG_ERROR([** X11-libs not installed or broken **]), $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
519 AC_CHECK_LIB(Xext, XShmQueryExtension,, AC_MSG_ERROR([** Xext-libs not installed or broken **]), $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
520 AC_CHECK_LIB(Xi, XOpenDevice,, AC_MSG_ERROR([** XInput not installed or broken **]), $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
521 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,, AC_MSG_ERROR([** DGA not installed or broken **]), $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
522 if test "$enable_dga2" = yes; then
523         AC_CHECK_LIB(Xxf86dga, XDGASelectInput,, AC_MSG_ERROR([** DGA2 not installed. Try using dga1 instead. **]), $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
524 fi
525
526 CFLAGS="$XML_CFLAGS $CFLAGS -DXML_MANUAL=$xml_man"
527 LIBS="$XML_LIBS $LIBS"
528
529 AC_OUTPUT(Makefile 
530         src/Makefile 
531         gnome-support/Makefile 
532         gnome-support/terminatorX.keys 
533         src/gui_icons/Makefile 
534         src/smallknob/Makefile 
535         doc/Makefile 
536         doc/terminatorX-manual/Makefile
537         doc/terminatorX-manual/C/Makefile       
538         terminatorX.spec 
539         terminatorX.1)
540
541 option_info() {
542         echo "$option support: $option_val"
543         if test "$option_val" != "yes"; then
544                 echo "  - If you want $option support get $option from"
545                 echo "  -       $option_url"
546                 echo "  - and reconfigure terminatorX"
547         fi
548 }
549
550 echo
551 echo configured terminatorX for:
552 echo ---------------------------
553 echo
554
555 echo manual: $xml_man
556
557 option=sox; option_val=$OPTION_SOX; option_url=http://sox.sourceforge.net/
558 option_info;
559
560 echo "mpg123 support: $OPTION_MPG123"
561 if test "$OPTION_MPG123" = "no"; then
562 echo "  - If you want mpg123 support get either mpg321 from"
563 echo "  -       http://mpg321.sourceforge.net/ or mpg123 from"
564 echo "  -       http://www.mpg123.de/"
565 echo "  - and reconfigure terminatorX"
566 fi
567
568 option=mad; option_val=$OPTION_MAD; option_url=http://www.mars.org/home/rob/proj/mpeg/
569 option_info;
570
571 option=ogg123; option_val=$OPTION_OGG123; option_url=http://www.xiph.org/ogg/vorbis/
572 option_info;
573
574 option=libvorbis; option_val=$OPTION_VORBIS; option_url=http://www.xiph.org/ogg/vorbis/
575 option_info;
576
577 option=audiofile; option_val=$OPTION_AUDIOFILE; option_url=http://www.68k.org/~michael/audiofile/
578 option_info;
579
580 option="ALSA (MIDI in)"; option_val=$OPTION_ALSAMIDI; option_url=http://www.alsa-project.org
581 option_info;
582
583 option=lrdf; option_val=$OPTION_LRDF; option_url=http://plugin.org.uk/releases/lrdf/
584 option_info;
585
586 echo "legacy files supprt: $OPTION_LEGACY"
587 echo "builtin-wav support: $OPTION_WAV"
588 echo "enhanced scheduling support: $OPTION_SCHEDULER"
589 echo "GNOME support: $OPTION_GNOME"
590 echo
591 echo You can now run \'make\' to compile terminatorX