cvsimport
[fvwm.git] / configure.ac
blob89757fbd18231bda172afe21e43c6beb747535d8
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 AC_PREREQ(2.60)
4 AC_INIT(fvwm/fvwm.c)
6 dnl should be "yes" only within the released distribution
7 ISRELEASED=no
8 version=2.7.0
9 VERSIONINFO=""
11 dnl date of the released version (please zero pad the day in the last 2 dates)
12 dnl for example: "4 February 2003", "04 Feb 2003", "2003-02-04"
13 dnl date format strings: "%e %B %Y", "%d-%b-%Y", "%Y-%m-%d"
14 RELDATELONG="15 April 2011"
15 RELDATESHORT="15-April-2011"
16 RELDATENUM="2011-04-15"
18 # constant variable settings
19 FVWMNAMELONG="F? Virtual Window Manager"
20 FVWMHOMEPAGE="http://fvwm.org/"
21 FVWMFTP="ftp.fvwm.org"
22 FVWMFTPDIR="/pub/ftp"
23 FVWMALTFTP="metalab.unc.edu"
24 FVWMALTFTPDIR="/pub/Linux/X11/window-managers/"
25 FVWMLIST="fvwm@fvwm.org"
26 FVWMWORKERSLIST="fvwm-workers@fvwm.org"
27 FVWMWORKERSLISTLONG="fvwm workers list <fvwm-workers@fvwm.org>"
28 MANPAGE_PREAMBLE='.\" WARNING: This file was automatically generated.  Edit the .in file instead.'
30 if test ! x"$ISRELEASED" = xyes; then
31         VERSIONINFO=" (from cvs)"
32         RELDATELONG="(not released yet)"
33         RELDATESHORT="(not released yet)"
34         RELDATENUM="(not released yet)"
35 #       # migo: unfortunately this nice idea can not work, it is not updated.
36 #       # I will think more about this, maybe autoconf-2.50+ has a solution.
37 #       if test -d CVS/ -a -f CVS/Entries && \
38 #               date +%Y-%m-%d -d 'Wed Sep  4 12:36:50 2002' >/dev/null 2>&1
39 #       then
40 #               # this is not the exact date, but better than the current date
41 #               for file in CVS/Entries */CVS/Entries; do
42 #                       changelog_date="`cat $file | grep /ChangeLog/ \
43 #                               | cut -d/ -f4`"
44 #                       test ! x"$changelog_date" = x && \
45 #                       date +%Y-%m-%d -d "$changelog_date" >>changelog_dates
46 #               done
47 #               changelog_date=`cat changelog_dates | sort -r -u | head -1`
48 #               VERSIONINFO=" (from cvs $changelog_date)"
49 #               rm -f changelog_dates
50 #       fi
53 AC_SUBST(ISRELEASED)
54 AH_TEMPLATE([VERSIONINFO],[Additional version information, like date])
55 AC_DEFINE_UNQUOTED(VERSIONINFO, "$VERSIONINFO")
56 AC_SUBST(VERSIONINFO)
57 AC_SUBST(RELDATELONG)
58 AC_SUBST(RELDATESHORT)
59 AC_SUBST(RELDATENUM)
60 AC_SUBST(FVWMNAMELONG)
61 AC_SUBST(FVWMHOMEPAGE)
62 AC_SUBST(FVWMFTP)
63 AC_SUBST(FVWMFTPDIR)
64 AC_SUBST(FVWMALTFTP)
65 AC_SUBST(FVWMALTFTPDIR)
66 AC_SUBST(FVWMLIST)
67 AC_SUBST(FVWMWORKERSLIST)
68 AC_SUBST(FVWMWORKERSLISTLONG)
69 AC_SUBST(MANPAGE_PREAMBLE)
71 AM_INIT_AUTOMAKE(fvwm, ${version})
72 AM_CONFIG_HEADER(config.h)
74 # check for programs needed to build html docs
75 AC_CHECK_PROG(SED, sed, sed, "")
77 #!!!
78 PERL=""
79 REQUIRED_PERL_VERSION=5.004
80 AC_SUBST(REQUIRED_PERL_VERSION)
81 if test x"$PERL" = x; then
82         AC_PATH_PROG(PERL, perl)
84 if test ! x"$PERL" = x; then
85         AC_MSG_CHECKING([for perl $REQUIRED_PERL_VERSION or better])
86         HAVE_PERL_FOR_DOCS=1
87         if ("$PERL" -e "require $REQUIRED_PERL_VERSION;") 2>/dev/null; then
88                 AC_MSG_RESULT(yes)
89         else
90                 AC_MSG_RESULT(no)
91                 AC_MSG_WARN([$PERL not found or too old])
92         fi
93 else
94         HAVE_PERL_FOR_DOCS=0
95         AC_MSG_WARN([perl is not found, it is required for some scripts and modules])
96         AC_MSG_WARN([It is recommended to install perl $REQUIRED_PERL_VERSION or better later])
97         PERL=/usr/bin/perl
99 AC_MSG_RESULT([assuming $PERL as perl location])
100 AC_SUBST(PERL)
102 # installation paths
103 FVWM_MODULESUBDIR=/${PACKAGE}/${VERSION}
104 FVWM_DATASUBDIR=/${PACKAGE}
105 FVWM_DOCSUBDIR=/doc/${PACKAGE}
107 AC_ARG_ENABLE(package-subdirs,
108   AS_HELP_STRING([--disable-package-subdirs],
109     [do not create subdirs for modules and data]),
110   [if test x"$enableval" = xno; then FVWM_MODULESUBDIR=""; FVWM_DATASUBDIR="";
111   fi], [])
114 FVWM_MODULEDIR='${libexecdir}'"$FVWM_MODULESUBDIR"
115 FVWM_DATADIR='${datadir}'"$FVWM_DATASUBDIR"
116 FVWM_DOCDIR='${datadir}'"$FVWM_DOCSUBDIR"
117 FVWM_PERLLIBDIR='${datadir}'"$FVWM_DATASUBDIR/perllib"
118 FVWM_CONFDIR='${sysconfdir}'dnl used _only_ to search for system.fvwm2rc
120 AC_SUBST(FVWM_MODULEDIR)
121 AC_SUBST(FVWM_DATADIR)
122 AC_SUBST(FVWM_PERLLIBDIR)
123 AC_SUBST(FVWM_CONFDIR)
124 AC_SUBST(FVWM_DOCDIR)
126 AH_TEMPLATE([FVWM_CONFIG],
127   [Name of config filenames in FVWM_USERDIR and FVWM_DATADIR])
128 AC_DEFINE(FVWM_CONFIG, "config")
130 AH_TEMPLATE([FVWM2RC],[Suffix for old (to be deprecated) config filenames])
131 AC_DEFINE(FVWM2RC, ".fvwm2rc")
133 # Various configure-time options
135 AC_ARG_ENABLE(dmalloc,
136   AS_HELP_STRING([--enable-dmalloc],
137     [enable support for the dmalloc debugging library]),
138   [ac_cv_dmalloc="$enableval"],
139   [ac_cv_dmalloc="no"])
141 AC_ARG_ENABLE(efence,
142   AS_HELP_STRING([--enable-efence],
143     [enable support for the efence debugging library]),
144   [ac_cv_efence="$enableval"],
145   [ac_cv_efence="no"])
147 smr_SWITCH(command-log, command logging, off, FVWM_COMMAND_LOG,, [Produces a log of all executed commands and their times on stderr.])
148 AH_VERBATIM([_FVWM_COMMAND_LOG],
149 [#ifdef FVWM_COMMAND_LOG
150 #   define FVWM_DEBUG_TIME 1
151 #endif])
153 smr_SWITCH(debug-msgs, debugging messages, off, FVWM_DEBUG_MSGS,, [if you would like to see lots of debug messages from fvwm, for debugging
154    purposes, uncomment the next line])
155 AH_VERBATIM([_FVWM_DEBUG_MSGS],
156 [#ifdef FVWM_DEBUG_MSGS
157 #   define DBUG(x,y) fvwm_msg(DBG,x,y)
158 #else
159 #   define DBUG(x,y) /* no messages */
160 #endif])
162 dnl dummy: smr_SWITCH(sm, dummy for test script, on, SESSION)
164 # Need to know where X is, for finding some libraries (e.g. xpm)
165 no_x=""
166 AC_PATH_XTRA
167 if test x"$no_x" = x"yes"; then
168   echo
169   echo "X11 libraries or header files could not be found.  Please make"
170   echo "sure the X11 development package is installed on your system."
171   echo "If it is definitely installed, try setting the include and library"
172   echo "paths with the --x-include and --x-libraries options of configure."
173   echo "Fvwm can not be compiled without the X11 development environment."
174   echo
175   echo "Aborting."
176   echo
177   exit 1
180 # FIXME: default value should be derived from computed path to X
181 # includes.  Actually, this should probably not appear in configure
182 # at all: it is settable at runtime, and only confuses the issue to
183 # have it settable here too.
185 AC_MSG_CHECKING(imagepath)
186 val="/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
187 AC_ARG_WITH(imagepath,
188   AS_HELP_STRING([--with-imagepath=PATH],
189     [colon-delimited search path for images]),
190 [ case "$withval" in
191   no)
192     AC_MSG_ERROR([Can not disable image path.])
193     ;;
194   yes)
195     ;;
196   *)
197     val="$withval"
198     ;;
199   esac ])
200 AH_TEMPLATE([FVWM_IMAGEPATH],[Where to search for images.])
201 AC_DEFINE_UNQUOTED(FVWM_IMAGEPATH, "$val")
203 FVWM_IMAGEPATH="$val"
204 AC_SUBST(FVWM_IMAGEPATH)
205 AC_MSG_RESULT($val)
207 # Minimal checks for programs: enough to enable checking for
208 # optional libraries.
209 AC_PROG_CC
210 AC_PROG_CPP
212 # added -Wall for gcc, what about for others?
213 if test "x$GCC" = "xyes"; then
214   CFLAGS="-Wall -Wno-implicit-int $CFLAGS"
217 # Help finding POSIX functions on some systems
218 AC_ISC_POSIX
219 AC_MINIX
221 # catch -Werror and similar options when running configure
222 AC_TRY_COMPILE([#include <stdio.h>],
223 [int i; static j; int *p; char *c;
224   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
225   *c = &i; c = p;
226   while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
227   return;], , AC_MSG_ERROR("
228 configure is not able to compile programs with warnings.  Please
229 remove all offending options like -Werror from the CFLAGS and
230 CPPFLAGS variables and run configure again."))
232 # check size of some types
233 ac_save_CFLAGS="$CFLAGS"
234 CFLAGS="$CFLAGS $X_CFLAGS"
235 AC_CHECK_SIZEOF(int)
236 AC_CHECK_SIZEOF(long)
237 AC_CHECK_SIZEOF(Window, , [#include <stdio.h>
238 #include <X11/X.h>])
239 AC_CHECK_SIZEOF(Pixel, , [#include <stdio.h>
240 #include <X11/Intrinsic.h>])
241 AC_CHECK_SIZEOF(void *)
242 CFLAGS="$ac_save_CFLAGS"
243 size_check_failed=""
244 if test "$ac_cv_sizeof_void_p" -gt "$ac_cv_sizeof_long"; then
245   echo "The type void * is bigger than long."
246   size_check_failed=1
248 if test "$ac_cv_sizeof_Window" -gt "$ac_cv_sizeof_long"; then
249   echo "The type Window is bigger than long."
250   size_check_failed=1
252 if test "$ac_cv_sizeof_Pixel" -gt "$ac_cv_sizeof_long"; then
253   echo "The type Pixel is bigger than long."
254   size_check_failed=1
256 if test x"$size_check_failed" = x1; then
257   echo "This is not supported by the module interface yet (make_new_vpacket)."
258   echo "Detected type sizes are: int($ac_cv_sizeof_int), long($ac_cv_sizeof_long), void*($ac_cv_sizeof_void_p), Window($ac_cv_sizeof_Window), Pixel($ac_cv_sizeof_Pixel)"
259   echo "Please report details of your system and this message to ${FVWMWORKERSLIST}."
260   echo
261   exit 1
264 # 'unset' is not portable, but setting to null is not enough to avoid using
265 # the cached value!  For ancient shells "rm config.cache" is a solution.
266 UNSET=true
267 if unset UNSET 2>/dev/null; then UNSET=unset; fi
270 # ********* multibyte
271 # FreeBSD has libxpg4, check this and use if found.
272 AC_CANONICAL_HOST
273 case $host_os in
274 freebsd*)
275         AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]);;
277         ;;
278 esac
280 # *** pkg-config
281 # unfortunately, we need pkg-config for the detection of certain libs:
282 # - version of fontconfig without fontconfig-config
283 # - version of fribidi without fribidi-config
284 AM_CHECK_PKG_CONFIG
287 # Building man pages & HTML documentation (from XML source).
288 # extract command names
289 if test ! x"$SED" = x; then
290         DOC_COMMANDS=`
291                 sed -n '
292                 :findhead
293                         /#.*define.*CMD_ENT/bfindcmd
294                         n
295                         bfindhead
296                 :findcmd
297                         n
298                         /CMD_ENT/bfound
299                         bfindcmd
300                 :found
301                         /"#"/bfindcmd
302                         /"propertychange"/bfindcmd
303                         /"readwritecolors"/bfindcmd
304                         /"send_.*"/bfindcmd
305                         /"set_.*"/bfindcmd
306                         s/.*CMD_ENT.*CMD_//
307                         s/,.*//
308                         p
309                         n
310                         bfindcmd
311         ' < fvwm/functable.c`
312         DOC_COMMANDS=`echo $DOC_COMMANDS`
313         # with .xml suffix
314         DOC_COMMANDS_XML=`for i in $DOC_COMMANDS; do echo ${i}.xml; done`
315         DOC_COMMANDS_XML=`echo $DOC_COMMANDS_XML`
316         # with .xml suffix and path
317         DOC_COMMANDS_XML_PATH=`
318                 for i in $DOC_COMMANDS; do
319                         echo ../commands/${i}.xml;
320                 done
321         `
322         DOC_COMMANDS_XML_PATH=`echo $DOC_COMMANDS_XML_PATH`
323         # with .html suffix
324         DOC_COMMANDS_HTML=`for i in $DOC_COMMANDS; do echo ${i}.html; done`
325         DOC_COMMANDS_HTML=`echo $DOC_COMMANDS_HTML`
326         # extract module names
327         DOC_MODULES=""
328         DOC_MODULES=`
329                 for i in modules/*; do echo "$i"; done |
330                 sed -n '
331                         :search
332                         /^modules.Fvwm/bfound
333                         bnext
334                 :found
335                         s/modules.//
336                         /FvwmTabs/bnext
337                         p
338                 :next
339                         n
340                         bsearch
341                 '
342         `
343         DOC_MODULES=`echo $DOC_MODULES`
344         DOC_MODULES_HTML=`for i in $DOC_MODULES; do echo ${i}.html; done`
345         DOC_MODULES_HTML=`echo $DOC_MODULES_HTML`
346         # extract man page section names
347         DOC_SECTIONS=`cat doc/fvwm/sections`
348         DOC_SECTIONS=`echo $DOC_SECTIONS`
349         DOC_SECTIONS_XML=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
350         DOC_SECTIONS_XML=`echo $DOC_SECTIONS_XML`
351         DOC_SECTIONS_XML_PATH=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
352         DOC_SECTIONS_XML_PATH=`echo $DOC_SECTIONS_XML`
353 else
354         DOC_COMMANDS=""
355         DOC_COMMANDS_XML=""
356         DOC_COMMANDS_XML_PATH=""
357         DOC_COMMANDS_HTML=""
358         DOC_MODULES=""
359         DOC_MODULES_HTML=""
360         DOC_SECTIONS=""
361         DOC_SECTIONS_XML=""
362         DOC_SECTIONS_XML_PATH=""
364 AC_SUBST(DOC_COMMANDS)
365 AC_SUBST(DOC_COMMANDS_XML)
366 AC_SUBST(DOC_COMMANDS_XML_PATH)
367 AC_SUBST(DOC_COMMANDS_HTML)
368 AC_SUBST(DOC_MODULES)
369 AC_SUBST(DOC_MODULES_HTML)
370 AC_SUBST(DOC_SECTIONS)
371 AC_SUBST(DOC_SECTIONS_XML)
372 AC_SUBST(DOC_SECTIONS_XML_PATH)
374 problem_mandoc=""
375 AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc, "")
377 AC_ARG_ENABLE(mandoc,
378   AS_HELP_STRING([--disable-mandoc],
379     [disable generation of man pages]),
380   [ if test x"$enableval" = xyes; then
381                 with_mandoc="yes, check"
382         else
383                 with_mandoc="no"
384                 problem_mandoc=": Explicitly disabled"
385         fi ],
386   [ with_mandoc="not specified, check" ]
389 if test ! x"$with_mandoc" = xno; then
390         if test x"$XSLTPROC" = x ; then
391                 with_mandoc="no"
392                 problem_mandoc=": No xsltproc found in PATH"
393         elif test x"$SED" = x ; then
394                 with_mandoc="no"
395                 problem_mandoc=": No sed found in PATH"
396         elif test x"$HAVE_PERL_FOR_DOCS" = x0 ; then
397                 with_mandoc="no"
398                 problem_mandoc=": No perl found in PATH"
399         else
400                 with_mandoc="yes"
401         fi
403 AM_CONDITIONAL([FVWM_BUILD_MANDOC], [test x"$with_mandoc" = xyes])
406 problem_htmldoc=""
407 AC_ARG_ENABLE(htmldoc,
408   AS_HELP_STRING([--enable-htmldoc],[enable generation of HTML documentation]),
409   [ if test x"$enableval" = xyes; then
410                 with_htmldoc="yes, check"
411         else
412                 with_htmldoc="no"
413                 problem_htmldoc=": Explicitly disabled"
414         fi ],
415   [ with_htmldoc="no" ]
418 if test ! x"$with_htmldoc" = xno; then
419         if test x"$XSLTPROC" = x ; then
420                 with_htmldoc="no"
421                 problem_htmldoc=": No xsltproc found in PATH"
422         elif test x"$SED" = x ; then
423                 with_htmldoc="no"
424                 problem_htmldoc=": No sed found in PATH"
425         elif test x"$HAVE_PERL_FOR_DOCS" = x0 ; then
426                 with_htmldoc="no"
427                 problem_htmldoc=": No perl found in PATH"
428         else
429                 with_htmldoc="yes"
430         fi
432 AM_CONDITIONAL([FVWM_BUILD_HTMLDOC], [test x"$with_htmldoc" = xyes])
435 # ********* session management
436 # Check the availability of SM; we don't have to add any extra libraries,
437 # since -lSM -lICE are in X_PRE_LIBS when they exist.
438 dnl [old check] AC_CHECK_LIB(SM, SmcOpenConnection, AC_DEFINE(SESSION), ,
439 dnl [old check]            [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
441 problem_sm=""
443 AC_ARG_ENABLE(sm,
444   AS_HELP_STRING([--disable-sm],[disable session management support]),
445   [ if test x"$enableval" = xyes; then
446     with_sm="yes, check"
447   else
448     with_sm="no"
449     problem_sm=": Explicitly disabled"
450   fi ],
451   [ with_sm="not specified, check" ]
454 if test ! x"$with_sm" = xno; then
455   dnl Uncomment the following and comment out AC_CHECK_LIB to get --with-sm-*
456   dnl $UNSET ac_cv_lib_SM_SmcOpenConnection
457   dnl $UNSET ac_cv_header_X11_SM_SMlib_h
458   dnl smr_CHECK_LIB(sm, SM, adds session management support, SmcOpenConnection,
459   dnl   X11/SM/SMlib.h,
460   dnl   [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS], $X_CFLAGS)
461   dnl test "$sm_LIBS" && AC_DEFINE(SESSION)
463   $UNSET ac_cv_lib_SM_SmcOpenConnection
464   AH_TEMPLATE([SESSION],[Enables session management functionality.])
465   AC_CHECK_LIB(SM, SmcOpenConnection, with_sm=yes; AC_DEFINE(SESSION),
466     with_sm=no; problem_sm=": Failed to detect libSM",
467     [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
469 dnl AC_SUBST(sm_LIBS)
470 dnl AC_SUBST(sm_CFLAGS)
473 # Checking for optional libraries
474 # Default is to use them if found; can be disable using --without
475 # These are put up front so that if they are requested, but
476 # configure fails to find them, we fail early.
479 # ********* shape extension
480 dnl smr_SWITCH(shape, shape extensions, on, SHAPE)
481 AC_ARG_ENABLE(shape,
482   AS_HELP_STRING([--disable-shape],[disable shaped window support]),
483   [ if test x"$enableval" = xyes; then
484     with_shape="yes, check"
485   else
486     with_shape="no"
487     problem_shape=": Explicitly disabled"
488   fi ],
489   [ with_shape="not specified, check" ]
492 AH_TEMPLATE(SHAPE,
493 [   Define if you want the Shaped window extensions.
494    Shaped window extensions seem to increase the window managers RSS
495    by about 60 Kbytes. They provide for leaving a title-bar on the window
496    without a border.
497    If you don't use shaped window extension, you can either make your
498    shaped windows undecorated, or live with a border and backdrop around
499    all your shaped windows (oclock, xeyes)
501    If you normally use a shaped window (xeyes or oclock), you might as
502    well compile this extension in, since the memory cost is  minimal in
503    this case (The shaped window shared libs will be loaded anyway). If you
504    don't normally use a shaped window, you have to decide for yourself.
506    Note: if it is compiled in, run time detection is used to make sure that
507    the currently running X server supports it.])
508 if test ! x"$with_shape" = xno; then
509   $UNSET ac_cv_lib_Xext_XShapeQueryExtension
510   AC_CHECK_LIB(Xext, XShapeQueryExtension,
511                with_shape=yes; AC_DEFINE(SHAPE),
512                with_shape=no;
513                problem_shape=": Failed to detect Shape extension",
514                [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
517 # ********* MIT Shared Memory Extension
518 AC_ARG_ENABLE(shm,
519   AS_HELP_STRING([--disable-shm],[disable MIT Shared Memory Extension]),
520   [ if test x"$enableval" = xyes; then
521     with_shm="yes, check"
522   else
523     with_shm="no"
524     problem_shm=": Explicitly disabled"
525   fi ],
526   [ with_shm="not specified, check" ]
529 AH_TEMPLATE([HAVE_XSHM],[Define if  MIT Shared Memory extension is used.])
530 if test ! x"$with_shm" = xno; then
531   $UNSET ac_cv_lib_Xext_XShmQueryExtension
532   AC_CHECK_LIB(Xext, XShmQueryExtension,
533                with_shm=yes; AC_DEFINE(HAVE_XSHM),
534                with_shm=no;
535                problem_shm=": Can't detect MIT Shared Memory ext.",
536                [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
539 # ********* xinerama
540 problem_xinerama=""
542 AC_ARG_ENABLE(xinerama,
543   AS_HELP_STRING([--disable-xinerama],[disable Xinerama multi screen support]),
544   [ if test x"$enableval" = xyes; then
545     with_xinerama="yes, check"
546   else
547     with_xinerama="no"
548     problem_xinerama=": Explicitly disabled"
549   fi ],
550   [ with_xinerama="not specified, check" ]
553 AH_TEMPLATE([HAVE_XINERAMA],[Define if Xinerama library is used.])
554 AH_TEMPLATE([HAVE_SOLARIS_XINERAMA],
555   [Define if Solaris' Xinerama calls are being used.
556   (Solaris 7 11/99 and later)])
557 AH_TEMPLATE([HAVE_SOLARIS_XINERAMA_H],
558   [Define if Solaris' X11/extensions/xinerama.h header is provided.
559   (Solaris 9 and later)])
560 if test ! x"$with_xinerama" = xno; then
561   $UNSET ac_cv_lib_Xinerama_XineramaIsActive
562   _check_solaris_xinerama=no
563   AC_CHECK_LIB(Xinerama, XineramaIsActive,
564     with_xinerama=yes; Xinerama_LIBS=-lXinerama; AC_DEFINE(HAVE_XINERAMA),
565     _check_solaris_xinerama=yes,
566     [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
567   if test x"$_check_solaris_xinerama" = xyes; then
568     AC_CHECK_LIB(Xext, XineramaGetState,
569       [ AC_DEFINE(HAVE_XINERAMA) AC_DEFINE(HAVE_SOLARIS_XINERAMA)
570       with_xinerama=yes; Xinerama_LIBS=-lXext
571       my_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$X_CPPFLAGS $CPPFLAGS"
572       my_hdr="X11/extensions/xinerama.h"
573       AC_CHECK_HEADER($my_hdr, AC_DEFINE(HAVE_SOLARIS_XINERAMA_H)
574         problem_xinerama=" (Using Solaris Xinerama calls)",
575         problem_xinerama=" (Using Solaris 9 prototypes for missing header)")
576       CPPFLAGS="$my_CPPFLAGS"],
577     with_xinerama=no; Xinerama_LIBS=
578     problem_xinerama=": Failed to detect libXinerama",
579     [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
580   fi
581   $UNSET _check_solaris_xinerama
583 AC_SUBST(Xinerama_LIBS)
584 AC_SUBST(Xinerama_CFLAGS)
586 # ********* xinerama-emulation
587 smr_SWITCH(
588   xinerama-emulation,
589   [Xinerama emulation on one screen (useful only for developers)], off,
590   USE_XINERAMA_EMULATION,,
591   [Define if Xinerama should be emulated on a single screen.])
592 if test x"$enable_xinerama_emulation" = xyes; then
593   with_xinerama_emulation=yes
594 else
595   with_xinerama_emulation=no
598 # ********* xrender
599 problem_xrender=""
600 AC_ARG_ENABLE(xrender,
601   AS_HELP_STRING([--disable-xrender],[disable Xrender alpha-blend rendering]),
602   [ if test x"$enableval" = xyes; then
603     with_xrender="yes, check"
604   else
605     with_xrender="no"
606     problem_xrender=": Explicitly disabled"
607   fi ],
608   [ with_xrender="not specified, check" ]
611 AH_TEMPLATE([HAVE_XRENDER],[Define if Xrender library is used.])
612 if test ! x"$with_xrender" = xno; then
613   $UNSET ac_cv_lib_Xrender_XRenderComposite
614   AC_CHECK_LIB(Xrender, XRenderComposite,
615     with_xrender=yes; Xrender_LIBS=-lXrender;
616     AC_DEFINE(HAVE_XRENDER),
617     with_xrender=no; Xrender_LIBS=
618     problem_xrender=": Failed to detect libXrender",
619     [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
621 AC_SUBST(Xrender_LIBS)
622 AC_SUBST(Xrender_CFLAGS)
624 # ********* xcursor
625 AH_TEMPLATE([HAVE_XCURSOR],[Define if Xcursor library is used.])
626 xcursor_CFLAGS=""
627 xcursor_LIBS=""
628 AC_ARG_ENABLE(xcursor,
629   AS_HELP_STRING([--disable-xcursor],
630     [disable Xcursor ARGB/animated cursor loading]),
631   [ if test x"$enableval" = xno; then
632        with_xcursor=no
633        problem_xcursor=": Explicitly disabled"
634     fi ],
636 if test ! x"$with_xcursor" = xno; then
637    with_xcursor=no
638    if test ! x"$with_xrender" = xno; then
639       $UNSET ac_cv_lib_Xrender_XRenderCreateCursor
640       AC_CHECK_LIB(Xrender, XRenderCreateCursor, [
641          with_xcursor=yes
642       ],[
643          problem_xcursor=": Your libXrender version is too old"
644       ],
645       [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
646    else
647       problem_xcursor=": Need Xrender support"
648    fi
650 if test x"$with_xcursor" = xyes ; then
651       $UNSET ac_cv_lib_Xcursor_XcursorImageLoadCursor
652       AC_CHECK_LIB(Xcursor, XcursorImageLoadCursor, [
653          AC_DEFINE(HAVE_XCURSOR)
654          Xcursor_LIBS=-lXcursor
655          problem_xcursor=""
656       ],[
657          with_xcursor=no
658          problem_xcursor=": Failed to detect libXcursor"
659       ],)
661 AC_SUBST(Xcursor_CFLAGS)
662 AC_SUBST(Xcursor_LIBS)
664 # ********* xft
665 problem_xft=""
667 AC_ARG_ENABLE(xft,
668   AS_HELP_STRING([--disable-xft],[disable Xft anti-aliased font rendering]),
669   [ if test x"$enableval" = xyes; then
670     with_xft="yes, check"
671   else
672     with_xft="no"
673     problem_xft=": Explicitly disabled"
674   fi ],
675   [
676     with_xft="not specified, check"
677   ]
680 AH_TEMPLATE([HAVE_XFT],[Define if Xft library is used.])
681 AH_TEMPLATE([HAVE_XFT2],[Define if Xft 2 library is used.])
682 AH_TEMPLATE([HAVE_XFT_UTF8],[Define if Xft library can handle utf8 encoding])
683 if test ! x"$with_xft" = xno; then
685   # first check for freetype2
686   have_freetype=no
687   AM_CHECK_FT2(6.1.0)
688   if test x"$no_ft" = x; then
689     have_freetype=yes
690   else
691     have_freetype=no
692     problem_xft=": Can't detect freetype2 >= 6.1.0/2.0.6"
693   fi
695   # check for fontconfig for Xft 2
696   have_fontconfig=no
697   if test ! x"$have_freetype" = xno ; then
698     AM_CHECK_FC(1.0.1)
699     if test x"$no_fc" = x ; then
700       have_fontconfig=yes
701       fontconfig_CFLAGS=`$PKG_CONFIG --cflags fontconfig`
702       fontconfig_LIBS=`$PKG_CONFIG --libs fontconfig`
703       CFLAGS="$CFLAGS $fontconfig_CFLAGS"
704       LIBS="$LIBS $fontconfig_LIBS"
705     else
706       have_fontconfig=no
707       problem_xft=": Can't detect fontconfig >= 1.0.1"
708     fi
709   fi
711   # now check for Xft 2
712   with_xft=no
713   if test ! x"$have_fontconfig" = xno ; then
714     # Xft 2
715     AM_CHECK_XFT(2.0.0)
716     if test x"$no_xft" = x; then
717       with_xft=yes
718       problem_xft=" (version 2)"
719       AC_DEFINE(HAVE_XFT2)
720       AC_DEFINE(HAVE_XFT)
721       AC_DEFINE(HAVE_XFT_UTF8)
722       Xft_LIBS=$XFT_LIBS
723       Xft_CFLAGS=$XFT_CFLAGS
724     else
725       problem_xft=": Can't detect Xft2, detected fontconfig"
726     fi
727   fi
729   # if Xft2 not detected check for Xft1
730   if test ! x"$have_freetype" = xno && test ! x"$with_xft" = xyes; then
731     #Xft 1
732     $UNSET ac_cv_lib_XftConfigSubstitute
733     $UNSET ac_cv_lib_Xft_XftFontOpen
734     $UNSET ac_cv_lib_Xft_XftDrawStringUtf8
735     AC_CHECK_LIB(Xft, XftFontOpen,
736       with_xft=yes, with_xft=no,
737       [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
738     if test x"$with_xft" = xyes ; then
739       AC_CHECK_LIB(Xft, XftConfigSubstitute, is_xft1=yes, is_xft1=no,
740         [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
741       if test x"$is_xft1" = xyes; then
742         Xft_LIBS="-lXft $FT2_LIBS"
743         Xft_CFLAGS="$Xft_CFLAGS $FT2_CFLAGS"
744         problem_xft=" (version 1)"
745         AC_DEFINE(HAVE_XFT)
746       else
747         with_xft=no
748         problem_xft=": Can't detect Xft 1 or fontconfig"
749       fi
750     else
751       problem_xft=": Can't detect Xft 1 or 2 and fontconfig"
752     fi
753     if test x"$with_xft" = xyes; then
754       AC_CHECK_LIB(Xft, XftDrawStringUtf8,
755         AC_DEFINE(HAVE_XFT_UTF8),,
756         [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
757     fi
758   fi
761 AC_SUBST(Xft_LIBS)
762 AC_SUBST(Xft_CFLAGS)
764 # ********* xpm
765 problem_xpm=": Xpm library or header not found"
767 $UNSET ac_cv_header_X11_xpm_h
768 $UNSET ac_cv_lib_Xpm_XpmReadFileToXpmImage
769 smr_CHECK_LIB(xpm, Xpm, for coloured or shaped icons,
770     XpmReadFileToXpmImage, X11/xpm.h,
771     [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS], $X_CFLAGS)
773 if test ! x"$xpm_LIBS" = x; then
774   # Check for proper version of Xpm -- from XEmacs 21.x configure.in
775   AC_MSG_CHECKING([for Xpm 3.4g or better])
776   my_CPPFLAGS="$CPPFLAGS"
777   my_LIBS="$LIBS"
778   CPPFLAGS="$CPPFLAGS $xpm_CFLAGS $X_CFLAGS"
779   LIBS="$LIBS $xpm_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
780   AC_TRY_RUN([#include <X11/xpm.h>
781    int main(int c, char **v) {
782    return c == 1 ? 0 :
783      XpmIncludeVersion != XpmLibraryVersion() ? 1 :
784      XpmIncludeVersion < 30407 ? 2 : 0 ;}],
785     [./conftest dummy_arg; xpm_status=$?;
786      if test x"$xpm_status" = x0; then
787        with_xpm=yes
788        problem_xpm=""
789      else
790        with_xpm=no;
791        if test x"$xpm_status" = x1; then
792          problem_xpm=": Xpm library and header versions don't match"
793        elif test x"$xpm_status" = x2x; then
794          problem_xpm=": Xpm library version is too old"
795        else
796          problem_xpm=": Internal xpm detection logic error"
797        fi
798      fi],
799    [with_xpm=no; problem_xpm=": Xpm test error, see config.log"],
800    [echo $ac_n "cross compiling; assumed OK... $ac_c"])
801   AC_MSG_RESULT($with_xpm)
802   CPPFLAGS="$my_CPPFLAGS"
803   LIBS="$my_LIBS"
805   AH_TEMPLATE([XPM],[Define if Xpm library is used.])
806   if test x"$with_xpm" = xyes; then
807     AC_DEFINE(XPM)
808     # FVWMBANNER=FvwmBanner AC_SUBST(FVWMBANNER)
809     # XPMROOT=xpmroot AC_SUBST(XPMROOT)
810     # FVWMSCRIPT=FvwmScript AC_SUBST(FVWMSCRIPT)
811   else
812     xpm_LIBS=
813     xpm_CFLAGS=
814   fi
816 AC_SUBST(xpm_LIBS)
817 AC_SUBST(xpm_CFLAGS)
819 # ********* png
820 problem_png=": png library or header not found"
822 $UNSET ac_cv_header_png_h
823 $UNSET ac_cv_lib_png_png_read_info
824 smr_CHECK_LIB(png, png, for coloured or shaped icons,
825     png_read_info, png.h, -lz -lm,)
827 if test ! x"$png_LIBS" = x; then
828   # Check for proper version of png
829   AC_MSG_CHECKING([for libpng 1.0.4a or better])
830   my_CPPFLAGS="$CPPFLAGS"
831   my_LIBS="$LIBS"
832   CPPFLAGS="$CPPFLAGS $png_CFLAGS"
833   LIBS="$LIBS $png_LIBS -lz -lm"
834   AC_TRY_RUN([#include <png.h>
835    int main(int c, char **v) {
836    return c == 1 ? 0 : (PNG_LIBPNG_VER < 10005) ? 2 : 0 ;}],
837     [./conftest dummy_arg; png_status=$?;
838      if test x"$png_status" = x0; then
839        with_png=yes;
840      else
841        with_png=no;
842        if test x"$png_status" = x2; then
843          problem_png=": png library version is too old"
844        else
845          problem_png=": Internal png detection logic error"
846        fi
847      fi],
848    [with_png="no"; problem_png=": png test error, see config.log"],
849    [echo $ac_n "cross compiling; assumed OK... $ac_c"])
850   AC_MSG_RESULT($with_png)
851   CPPFLAGS="$my_CPPFLAGS"
852   LIBS="$my_LIBS"
855 AH_TEMPLATE([HAVE_PNG],[Define if ppm library is used.])
856 if test x"$with_png" = xyes; then
857   AC_DEFINE(HAVE_PNG)
858   png_LIBS="$png_LIBS -lz"
859   problem_png=""
860 else
861   with_png=no
863 AC_SUBST(png_LIBS)
864 AC_SUBST(png_CFLAGS)
866 # ** needed by the png support
867 AC_C_BIGENDIAN
869 # ********* rsvg
870 rsvg_min_version=2.13.92
871 AH_TEMPLATE([HAVE_RSVG], [Define if librsvg library is used.])
873 AC_ARG_ENABLE(rsvg,
874   AS_HELP_STRING([--disable-rsvg],
875     [disable scalable vector graphics (SVG images)]),
876   [ if test x"$enableval" = xno; then
877        with_rsvg=no
878        problem_rsvg=": Explicitly disabled"
879     fi ],
881 if test ! x"$with_rsvg" = xno; then
882    with_rsvg=no
883    if test ! x"$PKG_CONFIG" = xno ; then
884       AC_MSG_CHECKING(for librsvg - version >= $rsvg_min_version)
885       if $PKG_CONFIG --exists librsvg-2.0 ; then
886          if $PKG_CONFIG --exists "librsvg-2.0 >= $rsvg_min_version" ; then
887             AC_MSG_RESULT(yes)
889             AC_MSG_CHECKING(for cairo svg backend)
890             if $PKG_CONFIG --exists cairo-svg ; then
891                svg_packages="librsvg-2.0 cairo-svg"
892             elif $PKG_CONFIG --exists libsvg-cairo ; then
893                svg_packages="librsvg-2.0 libsvg-cairo"
894             elif $PKG_CONFIG --exists cairo ; then
895                svg_packages="librsvg-2.0 cairo"
896             else
897                svg_packages=""
898             fi
899             if test ! x"$svg_packages" = x ; then
900                AC_MSG_RESULT(yes)
901                rsvg_CFLAGS=`$PKG_CONFIG --cflags $svg_packages`
902                rsvg_LIBS=`$PKG_CONFIG --libs $svg_packages`
903                with_rsvg=yes
904             else
905                AC_MSG_RESULT(no)
906                AC_MSG_WARN([*** cairo was not found in the pkg-config search])
907                AC_MSG_WARN([*** path. Add the directory containing cairo.pc])
908                AC_MSG_WARN([*** to the PKG_CONFIG_PATH environment variable.])
909                problem_rsvg=": Cannot detect cairo backend"
910             fi
911          else
912             AC_MSG_RESULT(no)
913             AC_MSG_WARN([*** Your librsvg version is < $rsvg_min_version])
914             problem_rsvg=": Your librsvg version is too old"
915          fi
916       else
917          AC_MSG_RESULT(no)
918          AC_MSG_WARN([*** librsvg-2.0 was not found in the pkg-config search])
919          AC_MSG_WARN([*** path. Either librsvg is not installed or you need])
920          AC_MSG_WARN([*** to add the directory containing librsvg-2.0.pc to])
921          AC_MSG_WARN([*** the PKG_CONFIG_PATH environment variable.])
922          problem_rsvg=": librsvg library or header not found"
923       fi
924    else
925       problem_rsvg=": pkg-config not found"
926    fi
928 if test x"$with_rsvg" = xyes ; then
929    AC_MSG_CHECKING(whether a librsvg program compiles and runs)
930    original_CFLAGS="$CFLAGS"
931    original_LIBS="$LIBS"
932    CFLAGS="$CFLAGS $rsvg_CFLAGS"
933    LIBS="$LIBS $rsvg_LIBS"
934    AC_TRY_RUN([
935       #include <librsvg/rsvg.h>
936       #include <librsvg/rsvg-cairo.h>
937       int main() {
938          RsvgHandle *rsvg;
939          g_type_init();
940          if(!(rsvg = rsvg_handle_new())) return 1;
941          g_object_unref(G_OBJECT(rsvg));
942          return 0;
943       }
944    ], [
945       AC_MSG_RESULT(yes)
946    ], [
947       AC_MSG_RESULT(no)
948       AC_MSG_WARN([*** The librsvg test program failed to run. If your system])
949       AC_MSG_WARN([*** has shared libraries outside the normal system library])
950       AC_MSG_WARN([*** path, you need to make sure that the LD_LIBRARY_PATH])
951       AC_MSG_WARN([*** (or the like) environment variable is correctly set.])
952       with_rsvg=no
953       problem_rsvg=": Failed to run test program"
954    ], [echo $ac_n "cross compiling; assumed OK... $ac_c"])
955    CFLAGS="$original_CFLAGS"
956    LIBS="$original_LIBS"
958 if test x"$with_rsvg" = xyes ; then
959    AC_DEFINE(HAVE_RSVG)
960    problem_rsvg=""
961 else
962    rsvg_CFLAGS=""
963    rsvg_LIBS=""
965 AC_SUBST(rsvg_CFLAGS)
966 AC_SUBST(rsvg_LIBS)
968 # ********* rplay
969 $UNSET ac_cv_header_rplay_h
970 $UNSET ac_cv_lib_rplay_rplay_create
971 # Add in X_EXTRA_LIBS here to get things like connect().
972 smr_CHECK_LIB(rplay, , adds audio capability, rplay_create, rplay.h,
973               $X_EXTRA_LIBS)
974 AH_TEMPLATE([HAVE_RPLAY],[Define if rplay library is used.])
975 test ! x"$rplay_LIBS" = x && AC_DEFINE(HAVE_RPLAY)
976 AC_SUBST(rplay_LIBS)
977 AC_SUBST(rplay_CFLAGS)
980 # ********* stroke
981 $UNSET ac_cv_header_stroke_h
982 $UNSET ac_cv_lib_stroke_stroke_init
983 dnl Add in X_LIBS for MOUSE_DROPPINGS?
984 dnl As of 23/Mar/2000 the only libstroke RPM has /usr/X11R6/include/stroke.h
985 AH_TEMPLATE([HAVE_STROKE],[Define if stroke library is used.])
986 smr_CHECK_LIB(stroke, , mouse strokes recognition,
987         stroke_init, stroke.h,
988         [$X_LIBS -lX11], $X_CFLAGS -I/usr/X11R6/include)
989 test ! x"$stroke_LIBS" = x &&
990 AC_DEFINE(HAVE_STROKE)
991 AH_VERBATIM([_HAVE_STROKE],
992 [#ifdef HAVE_STROKE
993 #    define STROKE_ARG(x) x,
994 #    define STROKE_CODE(x) x
995 #else
996 #    define STROKE_ARG(x)
997 #    define STROKE_CODE(x)
998 #endif])
999 AC_SUBST(stroke_LIBS)
1000 AC_SUBST(stroke_CFLAGS)
1003 # ********* readline
1004 with_readline=no
1005 problem_readline=": Both termcap and ncurses disabled"
1007 smr_ARG_WITHLIB(termcap, , to accomplish readline)
1008 AH_TEMPLATE([HAVE_READLINE],[Define if readline is available.])
1009 if test ! x"$with_termcap" = xno; then
1010   # Forget cached values, so user can re-run configure
1011   $UNSET ac_cv_header_readline_history_h
1012   $UNSET ac_cv_lib_readline_readline
1013   AC_MSG_CHECKING([with termcap])
1014   smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h,
1015     $termcap_LIBS)
1016   if test ! x"$readline_LIBS" = x; then
1017     with_readline=yes
1018     readline_LIBS="$readline_LIBS $termcap_LIBS"
1019     AC_DEFINE(HAVE_READLINE)
1020   fi
1022 smr_ARG_WITHLIB(ncurses, , to accomplish readline)
1023 if test ! x"$with_ncurses" = xno && test x"$readline_LIBS" = x; then
1024   # We couldn't use readline with termcap; try with ncurses?
1025   # Doesn't this seem a hacky way to do this??
1026   # unset cached values from last check...
1027   $UNSET ac_cv_header_readline_history_h
1028   $UNSET ac_cv_lib_readline_readline
1029   AC_MSG_CHECKING([with ncurses])
1030   dnl We can not call smr_CHECK_LIB twice here without having the usage twice.
1031   dnl old_LIBS=$LIBS
1032   dnl AC_CHECK_LIB(readline, readline, , , $ncurses_LIBS)
1033   dnl LIBS=$old_LIBS
1034   dnl if test x"$ac_cv_lib_readline_readline" = xyes; then
1035   dnl   AC_CHECK_HEADERS(readline/history.h)
1036   dnl   if test x"$ac_cv_header_readline_history_h" = xyes; then
1037   dnl     with_readline=yes
1038   dnl     readline_LIBS="$readline_LIBS $ncurses_LIBS"
1039   dnl     AC_DEFINE(HAVE_READLINE)
1040   dnl   fi
1041   dnl fi
1042   smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h,
1043     $ncurses_LIBS)
1044   if test ! x"$readline_LIBS" = x; then
1045     with_readline=yes
1046     readline_LIBS="$readline_LIBS $ncurses_LIBS"
1047     AC_DEFINE(HAVE_READLINE)
1048   fi
1050 dnl We need to check if we have GNU readline or BSD editline
1051 AH_TEMPLATE([HAVE_GNU_READLINE],[Define if readline has full GNU interface])
1052 if test x"$with_readline" = xyes; then
1053    AC_CHECK_LIB(readline, append_history, AC_DEFINE(HAVE_GNU_READLINE), [], $readline_LIBS)
1055 AC_SUBST(readline_LIBS)
1056 AC_SUBST(readline_CFLAGS)
1059 # Check if Xsetlocale() is available or not.
1060 AH_TEMPLATE([X_LOCALE],[Enables to use setlocale() provided by X])
1061 AC_CHECK_LIB(X11, _Xsetlocale, AC_DEFINE(X_LOCALE),, $X_LIBS -lX11)
1063 # Check if Xsetlocale() is available or not.
1064 AH_TEMPLATE([HAVE_XOUTPUT_METHOD],[Enable X output method])
1065 AC_CHECK_LIB(X11, XOpenOM, AC_DEFINE(HAVE_XOUTPUT_METHOD),, $X_LIBS -lX11)
1067 # ******** iconv
1068 with_iconv=no
1069 with_iconv_type=no
1070 with_lib_iconv=no
1071 with_sys_iconv=no
1072 problem_iconv=": Explicitly disabled"
1074 AC_ARG_ENABLE(iconv,
1075   AS_HELP_STRING([--disable-iconv],
1076     [disable support for iconv character conversion]),
1077   [ac_cv_iconv="$enableval"],
1078   [ac_cv_iconv="yes"])
1080 AH_TEMPLATE([USE_LIBICONV],
1081   [define if we use libiconv (not needed in general: for example iconv is
1082   native with recent glibc)])
1083 AH_TEMPLATE([HAVE_ICONV],
1084   [Define if iconv (in the libc) or libiconv is available])
1085 if test ! x"$ac_cv_iconv" = xno; then
1086   # * first check for gnu libiconv
1087   $UNSET ac_cv_header_libiconv_h
1088   $UNSET ac_cv_lib_libiconv_libiconv_open
1089   smr_CHECK_LIB(
1090         iconv, , if not found sys iconv is used, libiconv_open, iconv.h)
1091   if test ! x"$iconv_LIBS" = x; then
1092      AC_DEFINE(USE_LIBICONV)
1093      with_lib_iconv=yes
1094   fi
1095   AC_SUBST(iconv_LIBS)
1096   AC_SUBST(iconv_CFLAGS)
1098   # * check for system iconv
1100   AC_CHECK_FUNC(iconv_open, with_sys_iconv=yes)
1102   if test x"$with_lib_iconv" = xyes && test x"$with_sys_iconv" = xyes; then
1103      AC_MSG_WARN([***  Both system iconv and libiconv found: use libiconv])
1104      AC_MSG_WARN([***  Use --with-iconv-library=no to use the system iconv])
1105   fi
1107   # * libiconv found check for libcharset to get the good iconv charset
1108   if test x"$with_lib_iconv" = xyes; then
1109      CHECK_LIBCHARSET
1110   fi
1112   test x"$with_lib_iconv" = xyes -o x"$with_sys_iconv" = xyes &&
1113          with_iconv=yes && problem_iconv=""
1114   test x"$with_lib_iconv" = xyes && with_iconv_type="yes (libiconv)"
1115   test x"$with_sys_iconv" = xyes && with_iconv_type="yes (from C library)"
1117   if test x"$with_iconv" = xno; then
1118     AC_MSG_WARN([*** ])
1119     AC_MSG_WARN([*** No iconv() implementation found in C library or libiconv])
1120     AC_MSG_WARN([*** Please install libiconv ftp://ftp.gnu.org/pub/gnu/libiconv/])
1121     AC_MSG_WARN([*** ])
1122   fi
1124   if test x"$with_iconv" = xyes; then
1125      AC_DEFINE(HAVE_ICONV)
1126      ICONV_SECOND_ARG
1127   fi
1129 AH_VERBATIM([_HAVE_LIBCHARSET],
1130 [#ifdef USE_LIBICONV
1131 /* define to use locale_charset in the place of nl_langinfog if libiconv
1132  * is used */
1133 #undef HAVE_LIBCHARSET
1134 #endif])
1137 # ******** nl_langinfo and CODESET
1138 AH_TEMPLATE([HAVE_CODESET],[Have nl_langinfo (CODESET)])
1139 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
1140 AC_TRY_COMPILE([#include <langinfo.h>
1141 #include <locale.h>],
1142 [char *codeset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "");],
1143    AC_DEFINE(HAVE_CODESET)
1144    have_codeset=yes,
1145    have_codeset=no)
1146 AC_MSG_RESULT($have_codeset)
1149 # ********* fribidi
1150 AC_ARG_ENABLE(bidi,
1151   AS_HELP_STRING([--disable-bidi],[disable bi-directional text support]),
1152   [ if test x"$enableval" = xyes; then
1153     with_bidi="yes, check"
1154   else
1155     with_bidi="no"
1156   problem_bidi=": Explicitly disabled"
1157   fi ],
1158   [ with_bidi="not specified, check" ]
1161 if test ! x"$with_bidi" = xno; then
1162   AC_ARG_WITH(fribidi-bindir,
1163     AS_HELP_STRING([--with-fribidi-bindir=DIR],
1164       [directory of fribidi-config if not in PATH]),
1165     FRIBIDI_BINDIR="$withval", FRIBIDI_BINDIR=".")
1166   if test ! x"$PKG_CONFIG" = xno && $PKG_CONFIG fribidi --exists; then
1167     FRIBIDI_CONFIG="$PKG_CONFIG fribidi"
1168   else
1169     AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config,, [$FRIBIDI_BINDIR:$PATH])
1170   fi
1172   if test x"$FRIBIDI_CONFIG" = x; then
1173     with_bidi=no
1174     problem_bidi=": No fribidi-config, pkg-config fribidi"
1175   else
1176     Bidi_CFLAGS=`$FRIBIDI_CONFIG --cflags`
1177     Bidi_LIBS=`$FRIBIDI_CONFIG --libs`
1178     AC_CHECK_LIB(fribidi, fribidi_log2vis,
1179       with_bidi=yes; problem_bidi=,
1180       with_bidi=no; problem_bidi=": No good libs via $FRIBIDI_CONFIG",
1181       [$Bidi_LIBS $Bidi_CFLAGS])
1182   fi
1185 if test ! x"$with_bidi" = xno; then
1186   fribidi_in_path=yes
1187   ac_save_LIBS="$LIBS"
1188   LIBS="$LIBS $Bidi_LIBS"
1189   AC_TRY_RUN([#include <stdlib.h>
1190 #include <fribidi/fribidi.h>
1191 int main()
1193         FriBidiChar *logical_unicode_str =
1194                 (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
1195         fribidi_charset_to_unicode(
1196                 fribidi_parse_charset("iso8859-8"), "test", 4,
1197                 logical_unicode_str);
1198         return 0;
1200 ], [:], [fribidi_in_path=no])
1201   LIBS="$ac_save_LIBS"
1202   if test ! x"$fribidi_in_path" = xyes; then
1203     ac_save_CFLAGS="$CFLAGS"
1204     ac_save_LIBS="$LIBS"
1205     CFLAGS="$CFLAGS $Bidi_CFLAGS"
1206     LIBS="$LIBS $Bidi_LIBS"
1207   AC_TRY_RUN([#include <stdlib.h>
1208 #include <fribidi/fribidi.h>
1209 int main()
1211         FriBidiChar *logical_unicode_str =
1212                 (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
1213         fribidi_charset_to_unicode(
1214                 fribidi_parse_charset("iso8859-8"), "test", 4,
1215                 logical_unicode_str);
1216         return 0;
1218 ], [:], [with_bidi=no; problem_bidi=": Bad fribidi version, see config.log"])
1219     CFLAGS="$ac_save_CFLAGS"
1220     LIBS="$ac_save_LIBS"
1221   fi
1222   if test ! x"$fribidi_in_path" = xno; then
1223     Bidi_CFLAGS=
1224     Bidi_LIBS=-lfribidi
1225   fi
1228 AH_TEMPLATE([HAVE_BIDI],[Define if fribidi library is used.])
1229 AH_TEMPLATE([FRIBIDI_CHARSET_SPELLING],
1230   [Support fribidi-0.10.4 and older with "CHARSET" spelling.])
1231 if test x"$with_bidi" = xno; then
1232   Bidi_CFLAGS=
1233   Bidi_LIBS=
1234 else
1235   AC_DEFINE(HAVE_BIDI)
1236   AC_TRY_RUN([#include <fribidi/fribidi.h>
1237     int main(int c, char **v) {
1238       return FRIBIDI_CHARSET_NOT_FOUND * 0;
1239     }
1240   ], [AC_DEFINE(FRIBIDI_CHARSET_SPELLING)])
1242 AH_VERBATIM([_FRIBIDI_CHARSET_SPELLING],
1243 [#ifdef FRIBIDI_CHARSET_SPELLING
1244 #  define FRIBIDI_CHAR_SET_NOT_FOUND FRIBIDI_CHARSET_NOT_FOUND
1245 #endif])
1247 AC_SUBST(Bidi_LIBS)
1248 AC_SUBST(Bidi_CFLAGS)
1251 # ********* perllib
1252 with_perllib="yes"
1253 problem_perllib=""
1254 FVWM_PERLLIB=perllib
1255 AC_ARG_ENABLE(perllib,
1256   AS_HELP_STRING([--disable-perllib],[disable installing fvwm perl library]),
1257   [ if test x"$enableval" = xno; then
1258     with_perllib="no"
1259     problem_perllib=": Explicitly disabled"
1260     FVWM_PERLLIB=""
1261   fi ],
1263 AC_SUBST(FVWM_PERLLIB)
1265 # ******* gettext
1266 ALL_LINGUAS="ar de fr sv_SE zh_CN"
1267 FVWM_DOMAIN="fvwm"
1268 FVWMTASKBAR_DOMAIN="FvwmTaskBar"
1269 FVWMSCRIPT_DOMAIN="FvwmScript"
1270 ALL_DOMAINS="$FVWM_DOMAIN $FVWMTASKBAR_DOMAIN $FVWMSCRIPT_DOMAIN"
1272 AC_SUBST(ALL_LINGUAS)
1273 AC_SUBST(FVWM_DOMAIN)
1274 AC_SUBST(FVWMTASKBAR_DOMAIN)
1275 AC_SUBST(FVWMSCRIPT_DOMAIN)
1276 AC_SUBST(ALL_DOMAINS)
1278 LOCALEDIR='${datadir}'"/locale"
1279 with_gettext="yes"
1280 problem_gettext=""
1282 AC_ARG_ENABLE(nls,
1283   AS_HELP_STRING([--disable-nls],[do not use Native Language Support]),
1284   [ if test x"$enableval" = xno; then
1285     with_gettext="no"
1286     problem_gettext=": Explicitly disabled"
1287   fi ],
1290 AH_TEMPLATE([HAVE_NLS],
1291   [Define to 1 if translation of program messages to the user's native
1292   language is requested.])
1293 if test ! x"$with_gettext" = xno; then
1294   AM_GNU_FGETTEXT
1295   if test x"$USE_NLS" = "xyes"; then
1296     AC_DEFINE(HAVE_NLS, 1)
1297   else
1298     with_gettext="no"
1299     problem_gettext=": Failed to detected GNU gettext"
1300   fi
1301 else
1302   USE_NLS=no
1305 # libs and buil
1306 AC_SUBST(intl_LIBS)
1307 AC_SUBST(intl_CFLAGS)
1308 AC_SUBST(USE_NLS)
1309 AC_SUBST(POSUB)
1310 AC_SUBST(LOCALEDIR)
1311 AC_SUBST(MKINSTALLDIRS)
1312 # programs for devel
1313 AC_SUBST(XGETTEXT)
1314 AC_SUBST(GMSGFMT)
1315 AC_SUBST(MSGMERGE)
1316 AC_SUBST(MSGFMT)
1317 AC_SUBST(MSGUNIQ)
1318 #catalogs
1319 AC_SUBST(INST_LINGUAS)
1320 AC_SUBST(CATALOGS)
1321 AC_SUBST(POFILES)
1322 AC_SUBST(GMOFILES)
1323 AC_SUBST(UPDATEPOFILES)
1324 AC_SUBST(DUMMYPOFILES)
1325 AC_SUBST(CATOBJEXT)
1327 # Check for REQUIRED headers and functions before going any
1328 # further.
1330 # The module interface uses variadic functions for message passing.
1331 AC_CHECK_HEADERS(stdarg.h)
1332 AC_CHECK_FUNCS(vfprintf)
1333 if test x$ac_cv_header_stdarg_h = xno -o \
1334         $ac_cv_func_vfprintf = no; then
1335      AC_MSG_ERROR([stdarg.h and vfprintf required])
1338 # For reaping children, fvwm needs either waitpid() or wait3()
1339 # Some extra modules may need wait4() too
1340 AC_CHECK_FUNCS(waitpid)
1341 if test x$ac_cv_func_waitpid = xno; then
1342     AC_CHECK_FUNCS(wait3 wait4)
1343     if test x$ac_cv_func_wait3 = xno; then
1344         AC_MSG_ERROR([Either waitpid or wait3 function is required])
1345     fi
1348 # C89/C99 signal handling
1349 AC_CHECK_FUNCS(sigsetjmp siglongjmp)
1351 # Look harder for a C preprocessor for FvwmCpp
1352 AC_PATH_PROG(FVWM_CPP, cpp, no, $PATH:/lib:/usr/lib:/usr/ccs/lib)
1353 if test x"$FVWM_CPP" = xno; then
1354   FVWM_CPP=
1355   AC_MSG_WARN([cannot locate a C preprocessor: run FvwmCpp with -cppprog])
1357 dnl FIXME: make sure the cpp we found actually works...
1359 # Finish checking for programs.
1360 AC_PROG_INSTALL
1361 AC_PROG_LN_S
1362 AC_PROG_MAKE_SET
1363 AC_PROG_RANLIB
1364 dnl lex+yacc now only needed for FvwmScript developers when syntax is changed
1365 dnl AM_PROG_LEX
1366 dnl AC_PROG_YACC
1368 # Checks for header files.
1369 AC_HEADER_STDC
1370 AC_HEADER_SYS_WAIT
1371 AC_CHECK_HEADERS(stdlib.h fcntl.h limits.h malloc.h string.h memory.h unistd.h)
1372 AC_CHECK_HEADERS(getopt.h sys/select.h sys/systeminfo.h sys/time.h)
1374 # Checks for typedefs, structures, and compiler characteristics.
1375 AC_C_CONST
1376 AC_C_INLINE
1377 AC_TYPE_OFF_T
1378 AC_TYPE_PID_T
1379 AC_TYPE_SIZE_T
1380 AC_HEADER_TIME
1381 dnl AC_STRUCT_TM
1382 AC_TYPE_SIGNAL
1384 # Checks for library functions.
1385 AC_FUNC_ALLOCA
1386 AC_FUNC_STRFTIME
1387 AC_FUNC_SETPGRP
1388 AC_CHECK_FUNCS(gettimeofday mkfifo putenv setvbuf socket waitpid)
1389 AC_CHECK_FUNCS(strdup strstr strtol memmove memcpy strchr sysconf uname div)
1390 AC_CHECK_FUNCS(sigaction siginterrupt getpwuid)
1391 AC_CHECK_FUNCS(setpgrp setpgid)
1392 AC_CHECK_FUNCS(lstat)
1396 pds_CHECK_TYPE(sig_atomic_t, int, [#include <signal.h>], [Specify a type for sig_atomic_t if it's not available.])
1398 if test x$ac_cv_func_setvbuf = xyes; then
1399   AC_FUNC_SETVBUF_REVERSED
1402 AC_FUNC_SELECT
1403 if test ! x"$ac_cv_func_select" = xyes; then
1404   AC_MSG_ERROR([select required])
1407 # Check for standard functions that we have replacements for.
1408 AC_REPLACE_FUNCS(gethostname strcasecmp strncasecmp strdup strerror usleep atexit)
1409 dnl dv: this is harmful with autoconf 2.53 and is done automatically anyway
1410 dnl AC_SUBST(LIBOBJS)
1412 # check for mkstemp, see the discution on this subject on the fvwm workers
1413 # list (2001-02-16 and 2001-02-24)
1414 AM_SAFETY_CHECK_MKSTEMP
1416 # If we do not have atexit(), then check for on_exit()
1417 if test x$ac_cv_func_atexit = xno; then
1418   AC_CHECK_FUNCS(on_exit)
1421 # Check for unsetenv function
1422 AC_CHECK_FUNCS(unsetenv)
1425 # ********* GTK, IMLIB, GNOME
1426 # Check the availability of gtk
1427 FVWMGTK=""
1428 MANFVWMGTK=""
1429 AC_ARG_ENABLE(gtk,
1430   AS_HELP_STRING([--disable-gtk],[do not build modules using gtk library]),
1431     enable_gtktest="$enableval", enable_gtktest=yes)
1432 if test x"$enable_gtktest" = xyes; then
1433   AM_PATH_GTK(1.1.0,[
1434     FVWMGTK="FvwmGtk$EXEEXT" AC_SUBST(FVWMGTK)
1435     MANFVWMGTK=FvwmGtk.1 AC_SUBST(MANFVWMGTK)
1436   ],)
1437   if test x"$no_gtk" = x; then
1438     with_gtk=yes
1439     problem_gtk=""
1440   else
1441     with_gtk=no
1442     problem_gtk=": Failed to detect GTK, see config.log"
1443   fi
1444 else
1445   with_gtk=no
1446   problem_gtk=": Explicitly disabled"
1448 AC_SUBST(FVWMGTK)
1449 AC_SUBST(MANFVWMGTK)
1451 # Check the availability of gdk-imlib
1452 AH_TEMPLATE([GDK_IMLIB],[Define if gdk-imlib is used])
1453 AM_PATH_GDK_IMLIB(1.8.0, AC_DEFINE(GDK_IMLIB))
1454 if test x"$no_imlib" = x; then
1455   with_gdkimlib=yes
1456   problem_gdkimlib=""
1457 else
1458   with_gdkimlib=no
1459   problem_gdkimlib=": Failed on gdk-imlib, see config.log"
1462 GNOME_INIT_HOOK
1464 # Unfortunately we have 2 gnome supports: WM hints and gnome libs.
1465 # The $with_gnomehints below refers to the first, not GNOME_INIT_HOOK.
1466 if test ! x"$enable_gnome_hints" = xno; then
1467   with_gnomehints=yes
1468   problem_gnomehints=""
1469 else
1470   with_gnomehints=no
1471   problem_gnomehints=": Explicitly disabled"
1474 # Define some compatibility macros needed for config.h.
1475 mg_DEFINE_IF_NOT([#include <X11/keysym.h>],
1476   [defined XK_Page_Up && defined XK_Page_Down],
1477   [COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS],
1478   [Old AIX systems (3.2.5) don't define some common keysyms.])
1479 AH_VERBATIM([_COMPAT_OLD_KEYSYMDEF],
1480 [#ifdef COMPAT_OLD_KEYSYMDEF
1481 #  define XK_Page_Up   XK_Prior
1482 #  define XK_Page_Down XK_Next
1483 #endif])
1485 if test x"$with_stroke" = xyes; then
1486   mg_DEFINE_IF_NOT([#include <stroke.h>],
1487     [defined STROKE_MAX_SEQUENCE],
1488     [COMPAT_OLD_LIBSTROKE], [$stroke_CFLAGS],
1489     [Old libstroke <= 0.4 does not use STROKE_ prefix for constants.])
1491 AH_VERBATIM([_COMPAT_OLD_LIBSTROKE],
1492 [#ifdef COMPAT_OLD_LIBSTROKE
1493 /* currently we only use one constant */
1494 #  define STROKE_MAX_SEQUENCE MAX_SEQUENCE
1495 #endif])
1498 # Allow building with dmalloc.  Do this last to avoid screwing up any
1499 # other checks above.
1500 case "$ac_cv_dmalloc" in
1501   yes) AC_CHECK_HEADERS(dmalloc.h)
1502        AC_CHECK_LIB(dmalloc, dmalloc_shutdown)
1503        CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK" ;;
1504 esac
1507 # Allow building with efence.
1508 case "$ac_cv_efence" in
1509   yes) AC_CHECK_LIB(efence, malloc) ;;
1510 esac
1512 # some explicit definitions for config.h file
1513 AH_VERBATIM([_ZEND_EXPLICIT_DEFINITIONS],
1516  * The next few defines are options that are only changed from their values
1517  * shown here on systems that _don't_ use the configure script.
1518  **/
1520 /* Enable tests for missing too many XEvents.  Usually you want this. */
1521 #define WORRY_ABOUT_MISSED_XEVENTS 1
1523 /* Define if the X11 ConnectionNumber is actually a file descriptor. */
1524 #define HAVE_X11_FD 1
1526 /* Define if fork() has unix semantics.  On VMS, no child process is created
1527    until after a successful exec(). */
1528 #define FORK_CREATES_CHILD 1
1530 /* Suffix for executable filenames; NULL if no extension needed. */
1531 #define EXECUTABLE_EXTENSION NULL
1533 /* Define to remove the extension from executable pathnames before calling
1534    exec(). */
1535 #undef REMOVE_EXECUTABLE_EXTENSION
1537 /* Enables the "MiniIcon" Style option to specify a small pixmap which
1538  * can be used as one of the title-bar buttons, shown in window list,
1539  * utilized by modules, etc.  Requires PIXMAP_BUTTONS to be defined
1540  * (see below). */
1541 /* #undef MINI_ICONS */
1542 /* NOTE: hard coded to 1 */
1543 #if 1
1544 #define FMiniIconsSupported 1
1545 #else
1546 #define FMiniIconsSupported 0
1547 #endif
1549 /* Enables tagged general decoration styles which can be assigned to
1550  * windows using the UseDecor Style option, or dynamically updated
1551  * with ChangeDecor.  To create and destroy "decor" definitions, see
1552  * the man page entries for AddToDecor and DestroyDecor.  There is a
1553  * slight memory penalty for each additionally defined decor. */
1554 /* #undef USEDECOR */
1555 /* NOTE: hard coded to 1 */
1556 #define USEDECOR 1
1558 #if RETSIGTYPE != void
1559 #define SIGNAL_RETURN return 0
1560 #else
1561 #define SIGNAL_RETURN return
1562 #endif
1564 /* Allow GCC extensions to work, if you have GCC. */
1565 #ifndef __attribute__
1566 /* This feature is available in gcc versions 2.5 and later. */
1567 #  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
1568 #    define __attribute__(x)
1569 #  endif
1570 /* The __-protected variants of `format' and `printf' attributes
1571  * are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
1572 #  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
1573 #    define __format__ format
1574 #    define __printf__ printf
1575 #  endif
1576 #endif
1578 #if HAVE_ALLOCA_H
1579 #  include <alloca.h>
1580 #else
1581 #  ifdef _AIX
1582        #pragma alloca
1583 #  else
1584 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1585          char *alloca ();
1586 #    endif
1587 #  endif
1588 #endif
1590 #ifdef HAVE_STRING_H
1591 #  include <string.h>
1592 #endif
1593 #ifdef HAVE_STRINGS_H
1594 #  include <strings.h>
1595 #endif
1596 #ifdef HAVE_MEMORY_H
1597 #  include <memory.h>
1598 #endif
1599 #ifdef HAVE_STDLIB_H
1600 #  include <stdlib.h>
1601 #endif
1603 #if defined (HAVE_MALLOC_H) && !defined (__FreeBSD__) && !defined (__OpenBSD__) && !defined(__NetBSD__)
1604 #  include <malloc.h>
1605 #endif
1606 #ifdef HAVE_FCNTL_H
1607 #  include <fcntl.h>
1608 #endif
1609 #ifndef HAVE_STRCHR
1610 #  define strchr(_s,_c)   index((_s),(_c))
1611 #  define strrchr(_s,_c)  rindex((_s),(_c))
1612 #endif
1614 #ifndef HAVE_MEMCPY
1615 #  define memcpy(_d,_s,_l)  bcopy((_s),(_d),(_l))
1616 #endif
1617 #ifndef HAVE_MEMMOVE
1618 #  define memmove(_d,_s,_l) bcopy((_s),(_d),(_l))
1619 #endif
1621 #if HAVE_SYS_TYPES_H
1622 #  include <sys/types.h>
1623 #endif
1625 #if HAVE_UNISTD_H
1626 #  include <unistd.h>
1627 #endif
1629 #ifndef min
1630 #  define min(a,b) (((a)<(b)) ? (a) : (b))
1631 #endif
1632 #ifndef max
1633 #  define max(a,b) (((a)>(b)) ? (a) : (b))
1634 #endif
1635 #ifndef abs
1636 #  define abs(a) (((a)>=0)?(a):-(a))
1637 #endif
1639 #include "libs/defaults.h"
1641 #ifndef FEVENT_C
1642 #include <X11/Xlib.h>
1643 #include "libs/FEvent.h"
1644 #endif
1646 #ifndef O_NOFOLLOW
1647 #define O_NOFOLLOW 0
1648 #endif
1650 #ifdef HAVE_LSTAT
1651 #define DO_USE_LSTAT 1
1652 #define fvwm_lstat(x,y) lstat(x,y)
1653 #else
1654 #define DO_USE_LSTAT 0
1655 #define fvwm_lstat(x,y) -1
1656 #endif
1660 # mainly for fvwm-config
1661 AC_SUBST(with_bidi)
1662 AC_SUBST(with_gtk)
1663 AC_SUBST(with_gdkimlib)
1664 AC_SUBST(with_gettext)
1665 AC_SUBST(with_gnomelibs)
1666 AC_SUBST(with_iconv)
1667 AC_SUBST(with_perllib)
1668 AC_SUBST(with_png)
1669 AC_SUBST(with_rsvg)
1670 AC_SUBST(with_readline)
1671 AC_SUBST(with_rplay)
1672 AC_SUBST(with_shape)
1673 AC_SUBST(with_shm)
1674 AC_SUBST(with_sm)
1675 AC_SUBST(with_stroke)
1676 AC_SUBST(with_xcursor)
1677 AC_SUBST(with_xft)
1678 AC_SUBST(with_xinerama)
1679 AC_SUBST(with_xrender)
1680 AC_SUBST(with_xpm)
1682 dnl with autoconf <2.60 this is needed
1683 AC_SUBST(datarootdir)
1684 AC_SUBST(docdir)
1686 LOCAL_BUGADDR=${FVWM_BUGADDR-${USER-${LOGNAME-`whoami`}}}
1687 AC_SUBST(LOCAL_BUGADDR)
1689 AC_OUTPUT(
1690         Makefile
1691         libs/Makefile
1692         fvwm/Makefile
1693         modules/Makefile
1695         bin/fvwm-bug.1
1696         bin/fvwm-config.1
1697         bin/fvwm-convert-2.2.1
1698         bin/fvwm-convert-2.4.1
1699         bin/fvwm-convert-2.6.1
1700         bin/fvwm-menu-desktop.1
1701 dnl     bin/fvwm-menu-directory.1
1702 dnl     bin/fvwm-menu-headlines.1
1703 dnl     bin/fvwm-menu-xlock.1
1704 dnl     bin/fvwm-perllib.1
1705         bin/fvwm-root.1
1706         modules/FvwmAnimate/FvwmAnimate.1
1707         modules/FvwmAuto/FvwmAuto.1
1708         modules/FvwmBacker/FvwmBacker.1
1709         modules/FvwmBanner/FvwmBanner.1
1710         modules/FvwmButtons/FvwmButtons.1
1711         modules/FvwmCommand/FvwmCommand.1
1712         modules/FvwmConsole/FvwmConsole.1
1713         modules/FvwmConsole/FvwmConsoleC.pl.1
1714         modules/FvwmCpp/FvwmCpp.1
1715 dnl     modules/FvwmDebug/FvwmDebug.1
1716 dnl     modules/FvwmDebug/FvwmGtkDebug.1
1717 dnl     modules/FvwmDebug/FvwmOldDebug.1
1718         modules/FvwmDragWell/FvwmDragWell.1
1719         modules/FvwmEvent/FvwmEvent.1
1720         modules/FvwmForm/FvwmForm.1
1721         modules/FvwmGtk/FvwmGtk.1
1722         modules/FvwmIconBox/FvwmIconBox.1
1723         modules/FvwmIconMan/FvwmIconMan.1
1724         modules/FvwmIdent/FvwmIdent.1
1725         modules/FvwmM4/FvwmM4.1
1726         modules/FvwmPager/FvwmPager.1
1727 dnl     modules/FvwmPerl/FvwmPerl.1
1728         modules/FvwmProxy/FvwmProxy.1
1729         modules/FvwmRearrange/FvwmRearrange.1
1730         modules/FvwmSave/FvwmSave.1
1731         modules/FvwmSaveDesk/FvwmSaveDesk.1
1732         modules/FvwmScript/FvwmScript.1
1733         modules/FvwmScroll/FvwmScroll.1
1734         modules/FvwmTaskBar/FvwmTaskBar.1
1735         modules/FvwmTheme/FvwmTheme.1
1736         modules/FvwmWharf/FvwmWharf.1
1737         modules/FvwmWinList/FvwmWinList.1
1738 dnl     modules/FvwmWindowMenu/FvwmWindowMenu.1
1740         bin/Makefile
1741         bin/fvwm-config
1742         bin/fvwm-bug
1743         bin/fvwm-perllib
1744         bin/fvwm-menu-xlock
1745         bin/fvwm-menu-directory
1746         bin/fvwm-menu-desktop
1747         bin/fvwm-menu-headlines
1748         bin/fvwm-convert-2.4
1749         bin/fvwm-convert-2.6
1751         utils/Makefile
1752         perllib/Makefile
1753         perllib/General/Makefile
1754         perllib/FVWM/Makefile
1755         perllib/FVWM/Module/Makefile
1756         perllib/FVWM/Tracker/Makefile
1757         perllib/FVWM/Module.pm
1758         rpm/Makefile
1759         rpm/fvwm.spec
1760         debian/Makefile
1761         debian/control
1762         doc/fvwm.ent
1763         doc/footer.html
1764         doc/Makefile
1765         doc/fvwm/Makefile
1766         doc/commands/Makefile
1767         doc/docbook-xml/Makefile
1768         doc/docbook-xml/ent/Makefile
1769         doc/docbook-xsl/Makefile
1770         doc/docbook-xsl/common/Makefile
1771         doc/docbook-xsl/manpages/Makefile
1772         doc/docbook-xsl/profiling/Makefile
1773         doc/docbook-xsl/highlighting/Makefile
1774         doc/docbook-xsl/lib/Makefile
1775         doc/docbook-xsl/html/Makefile
1776         doc/modules/Makefile
1777         doc/modules/images/Makefile
1778         doc/modules/images/FvwmTabs/Makefile
1779         doc/images/Makefile
1780         doc/images/svg_rendering/Makefile
1781         docs/fvwm.lsm
1782         docs/Makefile
1783         sample.fvwmrc/Makefile
1784         tests/Makefile
1785         tests/hints/Makefile
1786         po/Makefile
1788         modules/FvwmAnimate/Makefile
1789         modules/FvwmAuto/Makefile
1790         modules/FvwmBacker/Makefile
1791         modules/FvwmBanner/Makefile
1792         modules/FvwmButtons/Makefile
1793         modules/FvwmCommand/Makefile
1794         modules/FvwmCommand/scripts/Makefile
1795         modules/FvwmConsole/Makefile
1796         modules/FvwmConsole/FvwmConsoleC.pl
1797         modules/FvwmCpp/Makefile
1798         modules/FvwmDebug/Makefile
1799         modules/FvwmDebug/FvwmDebug
1800         modules/FvwmDebug/FvwmGtkDebug
1801         modules/FvwmDragWell/Makefile
1802         modules/FvwmEvent/Makefile
1803         modules/FvwmForm/Makefile
1804         modules/FvwmIconBox/Makefile
1805         modules/FvwmIconMan/Makefile
1806         modules/FvwmIdent/Makefile
1807         modules/FvwmM4/Makefile
1808         modules/FvwmPager/Makefile
1809         modules/FvwmPerl/Makefile
1810         modules/FvwmPerl/FvwmPerl
1811         modules/FvwmProxy/Makefile
1812         modules/FvwmRearrange/Makefile
1813         modules/FvwmSave/Makefile
1814         modules/FvwmSaveDesk/Makefile
1815         modules/FvwmScript/Makefile
1816         modules/FvwmScript/Scripts/Makefile
1817         modules/FvwmScript/Widgets/Makefile
1818         modules/FvwmScroll/Makefile
1819         modules/FvwmTabs/Makefile
1820         modules/FvwmTabs/FvwmTabs
1821         modules/FvwmTaskBar/Makefile
1822         modules/FvwmTheme/Makefile
1823         modules/FvwmWharf/Makefile
1824         modules/FvwmWinList/Makefile
1825         modules/FvwmWindowMenu/Makefile
1826         modules/FvwmWindowMenu/FvwmWindowMenu
1827         modules/FvwmGtk/Makefile
1830 # ---------------------------------------------------------------------------
1831 # Original config.status is patched to make generated scripts executable.
1832 sed 's/> $ac_file/> $ac_file; test x"`head -1 $ac_file | cut -c1-2`" = x"#!" \&\& chmod a+rx $ac_file/' <config.status >config.status-t && \
1833 mv config.status-t config.status
1834 chmod +x config.status
1835 # ---------------------------------------------------------------------------
1837 # ---------------------------------------------------------------------------
1838 cat >config.status-t <<EOF
1839 #! /bin/sh
1841 # Original config.status is patched to satisfy processing *.in with 'make -j'.
1842 # This bug seems to be partially fixed in autoconf-2.50 (not in all places).
1843 UNIQUE_POSTFIX=\$\$
1846 sed 's/conftest/conftest\${UNIQUE_POSTFIX}/g' <config.status >>config.status-t && \
1847 mv config.status-t config.status
1848 chmod +x config.status
1849 # ---------------------------------------------------------------------------
1851 eval my_bindir="`eval echo ${bindir}`"
1852 eval my_mandir="`eval echo ${mandir}`"
1853 eval my_moddir="`eval echo ${FVWM_MODULEDIR}`"; eval my_moddir="$my_moddir"
1854 eval my_datdir="`eval echo ${FVWM_DATADIR}`"
1855 eval my_docdir="`eval echo ${FVWM_DOCDIR}`"
1856 eval my_plldir="`eval echo ${FVWM_PERLLIBDIR}`"
1857 test x"$FVWM_PERLLIB" = x && my_plldir="(Not installed) $my_plldir"
1858 eval my_localedir="`eval echo ${LOCALEDIR}`"
1859 test x"$USE_NLS" = xno && my_localedir="(Not installed) $my_localdir"
1861 case "$with_gtk" in
1862   yes) fvwmgtk_msg="
1863   With GDK image support in FvwmGtk?  $with_gdkimlib$problem_gdkimlib
1864   With GNOME libs support in FvwmGtk? $with_gnomelibs$problem_gnomelibs" ;;
1865   no) fvwmgtk_msg="" ;;
1866 esac
1868 echo "
1869 Fvwm Configuration:
1871   Version:     $VERSION$VERSIONINFO
1873   Executables: $my_bindir
1874   Man pages:   $my_mandir
1875   Modules:     $my_moddir
1876   Data files:  $my_datdir
1877   Doc files:   $my_docdir
1878   Perl lib:    $my_plldir
1879   Locale msg:  $my_localedir $INST_LINGUAS
1881   With Asian bi-direct. text support? $with_bidi$problem_bidi
1882   With Gettext Native Lang support?   $with_gettext$problem_gettext
1883   With GTK+ required for FvwmGtk?     $with_gtk$problem_gtk$fvwmgtk_msg
1884   With Iconv support?                 $with_iconv_type$problem_iconv
1885   With Mouse strokes (gestures)?      $with_stroke$problem_stroke
1886   With PNG image support?             $with_png$problem_png
1887   With ReadLine sup. in FvwmConsole?  $with_readline$problem_readline
1888   With RPlay support in FvwmEvent?    $with_rplay$problem_rplay
1889   With Shaped window support?         $with_shape$problem_shape
1890   With Shared memory for XImage?      $with_shm$problem_shm
1891   With Session Management support?    $with_sm$problem_sm
1892   With SVG image support?             $with_rsvg$problem_rsvg
1893   With Xcursor support?               $with_xcursor$problem_xcursor
1894   With Xinerama multi-head support?   $with_xinerama$problem_xinerama
1895   With Xft anti-alias font support?   $with_xft$problem_xft
1896   With XPM image support?             $with_xpm$problem_xpm
1897   With Xrender image support?         $with_xrender$problem_xrender
1898   Build man pages?                    $with_mandoc$problem_mandoc
1899   Build HTML documentation?           $with_htmldoc$problem_htmldoc
1901 See INSTALL.fvwm for the description of what this may mean."
1903 case "$with_xinerama_emulation" in
1904   yes) echo "  Xinerama emulation enabled." ;;
1905 esac
1906 case "$ac_cv_dmalloc" in
1907   yes) echo "  DMALLOC heap debugging library enabled." ;;
1908 esac
1909 case "$ac_cv_efence" in
1910   yes) echo "  EFENCE debugging library enabled." ;;
1911 esac