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