1 dnl Process this file with autoconf to produce a configure script.
6 dnl should be "yes" only within the released distribution
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 RELDATELONG="6 October 2004"
14 RELDATESHORT="06-Oct-2004"
15 RELDATENUM="2004-10-06"
17 dnl constant variable settings
19 FVWMNAMELONG="F? Virtual Window Manager"
20 FVWMHOMEPAGE="http://fvwm.org/"
21 FVWMFTP="ftp.fvwm.org"
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't 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
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/ \
44 # test x"$changelog_date" != x && \
45 # date +%Y-%m-%d -d "$changelog_date" >>changelog_dates
47 # changelog_date=`cat changelog_dates | sort -r -u | head -1`
48 # VERSIONINFO=" (from cvs $changelog_date)"
49 # rm -f changelog_dates
54 AC_DEFINE_UNQUOTED(VERSIONINFO, "$VERSIONINFO")
57 AC_SUBST(RELDATESHORT)
59 AC_SUBST(FVWMNAMEUCASE)
60 AC_SUBST(FVWMNAMELONG)
61 AC_SUBST(FVWMHOMEPAGE)
65 AC_SUBST(FVWMALTFTPDIR)
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 dnl installation paths
75 FVWM_MODULESUBDIR=/${PACKAGE}/${VERSION}
76 FVWM_DATASUBDIR=/${PACKAGE}
78 AC_ARG_ENABLE(package-subdirs,
79 [ --disable-package-subdirs do not create subdirs for modules and data],
80 [if test x"$enableval" = xno; then FVWM_MODULESUBDIR=""; FVWM_DATASUBDIR="";
83 FVWM_MODULEDIR='${libexecdir}'"$FVWM_MODULESUBDIR"
84 FVWM_DATADIR='${datadir}'"$FVWM_DATASUBDIR"
85 FVWM_PERLLIBDIR='${datadir}'"$FVWM_DATASUBDIR/perllib"
86 FVWM_CONFDIR='${sysconfdir}'dnl used _only_ to search for system.fvwm2rc
88 AC_SUBST(FVWM_MODULEDIR)
89 AC_SUBST(FVWM_DATADIR)
90 AC_SUBST(FVWM_PERLLIBDIR)
91 AC_SUBST(FVWM_CONFDIR)
94 dnl Various configure-time options
97 AC_ARG_ENABLE(dmalloc,
98 [ --enable-dmalloc enable support for the dmalloc debugging library],
99 [ac_cv_dmalloc="$enableval"],
100 [ac_cv_dmalloc="no"])
102 AC_ARG_ENABLE(efence,
103 [ --enable-efence enable support for the efence debugging library],
104 [ac_cv_efence="$enableval"],
107 smr_SWITCH(command-log, command logging, off, FVWM_COMMAND_LOG)
108 smr_SWITCH(debug-msgs, debugging messages, off, FVWM_DEBUG_MSGS)
109 dnl dummy: smr_SWITCH(sm, dummy for test script, on, SESSION)
111 dnl FIXME: default value should be derived from computed path to X
112 dnl includes. Actually, this should probably not appear in configure
113 dnl at all: it is settable at runtime, and only confuses the issue to
114 dnl have it settable here too.
116 AC_MSG_CHECKING(imagepath)
117 val="/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
118 AC_ARG_WITH(imagepath,
119 [ --with-imagepath=PATH colon-delimited search path for images],
122 AC_MSG_ERROR([Can not disable image path.])
130 AC_DEFINE_UNQUOTED(FVWM_IMAGEPATH, "$val")
131 FVWM_IMAGEPATH="$val"
132 AC_SUBST(FVWM_IMAGEPATH)
135 dnl Minimal checks for programs: enough to enable checking for
136 dnl optional libraries.
140 dnl added -Wall for gcc, what about for others?
141 if test "x$GCC" = "xyes"; then
142 CFLAGS="-Wall -Wno-implicit-int $CFLAGS"
145 dnl Help finding POSIX functions on some systems
149 dnl catch -Werror and similar options when running configure
150 AC_TRY_COMPILE([#include <stdio.h>],
151 [int i; static j; int *p; char *c;
152 switch (*p = p = *c) { case 0: printf("%Q", c, p); }
154 while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
155 return;], , AC_MSG_ERROR("
156 configure is not able to compile programs with warnings. Please
157 remove all offending options like -Werror from the CFLAGS and
158 CPPFLAGS variables and run configure again."))
160 dnl Need to know where X is, for finding some libraries (e.g. xpm)
163 if test x"$no_x" = x"yes"; then
165 echo "X11 libraries or header files could not be found. Please make"
166 echo "sure the X11 development package is installed on your system."
167 echo "If it is definitely installed, try setting the include and library"
168 echo "paths with the --x-include and --x-libraries options of configure."
169 echo "Fvwm can not be compiled without the X11 development environment."
176 dnl 'unset' is not portable, but setting to null is not enough to avoid using
177 dnl the cached value! For ancient shells "rm config.cache" is a solution.
179 if unset UNSET 2>/dev/null; then UNSET=unset; fi
182 dnl ********* multibyte
183 dnl FreeBSD has libxpg4, check this and use if found.
187 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]);;
193 dnl unfortunately, we need pkg-config for the detection of certain libs:
194 dnl - certain version of fontconfig (without fontconfig-config
197 dnl ********* session management
198 dnl Check the availability of SM; we don't have to add any extra libraries,
199 dnl since -lSM -lICE are in X_PRE_LIBS when they exist.
200 dnl [old check] AC_CHECK_LIB(SM, SmcOpenConnection, AC_DEFINE(SESSION), ,
201 dnl [old check] [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
206 [ --disable-sm disable session management support],
207 [ if test x"$enableval" = xyes; then
211 problem_sm=": Explicitly disabled"
213 [ with_sm="not specified, check" ]
216 if test x"$with_sm" != xno; then
217 dnl Uncomment the following and comment out AC_CHECK_LIB to get --with-sm-*
218 dnl $UNSET ac_cv_lib_SM_SmcOpenConnection
219 dnl $UNSET ac_cv_header_X11_SM_SMlib_h
220 dnl smr_CHECK_LIB(sm, SM, adds session management support, SmcOpenConnection,
222 dnl [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS], $X_CFLAGS)
223 dnl test "$sm_LIBS" && AC_DEFINE(SESSION)
225 $UNSET ac_cv_lib_SM_SmcOpenConnection
226 AC_CHECK_LIB(SM, SmcOpenConnection, with_sm=yes; AC_DEFINE(SESSION),
227 with_sm=no; problem_sm=": Failed to detect libSM",
228 [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
230 dnl AC_SUBST(sm_LIBS)
231 dnl AC_SUBST(sm_CFLAGS)
234 dnl Checking for optional libraries
235 dnl Default is to use them if found; can be disable using --without
236 dnl These are put up front so that if they are requested, but
237 dnl configure fails to find them, we fail early.
240 dnl ********* shape extension
241 dnl smr_SWITCH(shape, shape extensions, on, SHAPE)
243 [ --disable-shape disable shaped window support],
244 [ if test x"$enableval" = xyes; then
245 with_shape="yes, check"
248 problem_shape=": Explicitly disabled"
250 [ with_shape="not specified, check" ]
253 if test x"$with_shape" != xno; then
254 $UNSET ac_cv_lib_Xext_XShapeQueryExtension
255 AC_CHECK_LIB(Xext, XShapeQueryExtension,
256 with_shape=yes; AC_DEFINE(SHAPE),
258 problem_shape=": Failed to detect Shape extension",
259 [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
262 dnl ********* MIT Shared Memory Extension
264 [ --disable-shm disable MIT Shared Memory Extension],
265 [ if test x"$enableval" = xyes; then
266 with_shm="yes, check"
269 problem_shm=": Explicitly disabled"
271 [ with_shm="not specified, check" ]
274 if test x"$with_shm" != xno; then
275 $UNSET ac_cv_lib_Xext_XShmQueryExtension
276 AC_CHECK_LIB(Xext, XShmQueryExtension,
277 with_shm=yes; AC_DEFINE(HAVE_XSHM),
279 problem_shm=": Can't detect MIT Shared Memory ext.",
280 [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
283 dnl ********* xinerama
286 AC_ARG_ENABLE(xinerama,
287 [ --disable-xinerama disable Xinerama multi screen support],
288 [ if test x"$enableval" = xyes; then
289 with_xinerama="yes, check"
292 problem_xinerama=": Explicitly disabled"
294 [ with_xinerama="not specified, check" ]
297 if test x"$with_xinerama" != xno; then
298 $UNSET ac_cv_lib_Xinerama_XineramaIsActive
299 _check_solaris_xinerama=no
300 AC_CHECK_LIB(Xinerama, XineramaIsActive,
301 with_xinerama=yes; Xinerama_LIBS=-lXinerama; AC_DEFINE(HAVE_XINERAMA),
302 _check_solaris_xinerama=yes,
303 [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
304 if test x"$_check_solaris_xinerama" = xyes; then
305 AC_CHECK_LIB(Xext, XineramaGetState,
306 [ AC_DEFINE(HAVE_XINERAMA) AC_DEFINE(HAVE_SOLARIS_XINERAMA)
307 with_xinerama=yes; Xinerama_LIBS=-lXext
308 my_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$X_CPPFLAGS $CPPFLAGS"
309 my_hdr="X11/extensions/xinerama.h"
310 AC_CHECK_HEADER($my_hdr, AC_DEFINE(HAVE_SOLARIS_XINERAMA_H)
311 problem_xinerama=" (Using Solaris Xinerama calls)",
312 problem_xinerama=" (Using Solaris 9 prototypes for missing header)")
313 CPPFLAGS="$my_CPPFLAGS"],
314 with_xinerama=no; Xinerama_LIBS=
315 problem_xinerama=": Failed to detect libXinerama",
316 [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
318 $UNSET _check_solaris_xinerama
320 AC_SUBST(Xinerama_LIBS)
321 AC_SUBST(Xinerama_CFLAGS)
323 dnl ********* xinerama-emulation
324 smr_SWITCH(xinerama-emulation, Xinerama emulation on one screen (useful only for developers), off,
325 USE_XINERAMA_EMULATION)
326 if test x"$enable_xinerama_emulation" = xyes; then
327 with_xinerama_emulation=yes
329 with_xinerama_emulation=no
332 dnl ********* xrender
334 AC_ARG_ENABLE(xrender,
335 [ --disable-xrender disable Xrender alpha-blend rendering ],
336 [ if test x"$enableval" = xyes; then
337 with_xrender="yes, check"
340 problem_xrender=": Explicitly disabled"
342 [ with_xrender="not specified, check" ]
345 if test x"$with_xrender" != xno; then
346 $UNSET ac_cv_lib_Xrender_XRenderComposite
347 AC_CHECK_LIB(Xrender, XRenderComposite,
348 with_xrender=yes; Xrender_LIBS=-lXrender; AC_DEFINE(HAVE_XRENDER),
349 with_xrender=no; Xrender_LIBS=
350 problem_xrender=": Failed to detect libXrender",
351 [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS])
353 AC_SUBST(Xrender_LIBS)
354 AC_SUBST(Xrender_CFLAGS)
360 [ --disable-xft disable Xft anti-aliased font rendering],
361 [ if test x"$enableval" = xyes; then
362 with_xft="yes, check"
365 problem_xft=": Explicitly disabled"
368 with_xft="not specified, check"
372 if test x"$with_xft" != xno; then
374 dnl first check for freetype2
377 if test x"$no_ft" = x; then
381 problem_xft=": Can't detect freetype2 >= 6.1.0/2.0.6"
384 dnl check for fontconfig for Xft 2
386 if test x"$have_freetype" != xno ; then
388 if test x"$no_fc" = x ; then
392 problem_xft=": Can't detect fontconfig >= 1.0.1"
396 dnl now check for Xft 2
398 if test x"$have_fontconfig" != xno ; then
401 if test x"$no_xft" = x; then
403 problem_xft=" (version 2)"
406 AC_DEFINE(HAVE_XFT_UTF8)
408 Xft_CFLAGS=$XFT_CFLAGS
410 problem_xft=": Can't detect Xft2, detected fontconfig"
414 dnl if Xft2 not detected check for Xft1
415 if test x"$have_freetype" != xno -a x"$with_xft" != xyes; then
417 $UNSET ac_cv_lib_XftConfigSubstitute
418 $UNSET ac_cv_lib_Xft_XftFontOpen
419 $UNSET ac_cv_lib_Xft_XftDrawStringUtf8
420 AC_CHECK_LIB(Xft, XftFontOpen,
421 with_xft=yes, with_xft=no,
422 [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
423 if test x"$with_xft" = xyes ; then
424 AC_CHECK_LIB(Xft, XftConfigSubstitute, is_xft1=yes, is_xft1=no,
425 [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
426 if test x"$is_xft1" = xyes; then
427 Xft_LIBS="-lXft $FT2_LIBS"
428 Xft_CFLAGS="$Xft_CFLAGS $FT2_CFLAGS"
429 problem_xft=" (version 1)"
433 problem_xft=": Can't detect Xft 1 or fontconfig"
436 problem_xft=": Can't detect Xft 1 or 2 and fontconfig"
438 if test x"$with_xft" = xyes; then
439 AC_CHECK_LIB(Xft, XftDrawStringUtf8, AC_DEFINE(HAVE_XFT_UTF8),,
440 [$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $FT2_LIBS $Xrender_LIBS])
449 problem_xpm=": Xpm library or header not found"
451 $UNSET ac_cv_header_X11_xpm_h
452 $UNSET ac_cv_lib_Xpm_XpmReadFileToXpmImage
453 smr_CHECK_LIB(xpm, Xpm, for coloured or shaped icons,
454 XpmReadFileToXpmImage, X11/xpm.h,
455 [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS], $X_CFLAGS)
457 if test x"$xpm_LIBS" != x; then
458 dnl Check for proper version of Xpm -- from XEmacs 21.x configure.in
459 AC_MSG_CHECKING([for Xpm 3.4g or better])
460 my_CPPFLAGS="$CPPFLAGS"
462 CPPFLAGS="$CPPFLAGS $xpm_CFLAGS $X_CFLAGS"
463 LIBS="$LIBS $xpm_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
464 AC_TRY_RUN([#include <X11/xpm.h>
465 int main(int c, char **v) {
467 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
468 XpmIncludeVersion < 30407 ? 2 : 0 ;}],
469 [./conftest dummy_arg; xpm_status=$?;
470 if test x"$xpm_status" = x0; then
475 if test x"$xpm_status" = x1; then
476 problem_xpm=": Xpm library and header versions don't match"
477 elif test x"$xpm_status" = x2x; then
478 problem_xpm=": Xpm library version is too old"
480 problem_xpm=": Internal xpm detection logic error"
483 [with_xpm=no; problem_xpm=": Xpm test error, see config.log"])
484 AC_MSG_RESULT($with_xpm)
485 CPPFLAGS="$my_CPPFLAGS"
488 if test x"$with_xpm" = xyes; then
490 # FVWMBANNER=FvwmBanner AC_SUBST(FVWMBANNER)
491 # XPMROOT=xpmroot AC_SUBST(XPMROOT)
492 # FVWMSCRIPT=FvwmScript AC_SUBST(FVWMSCRIPT)
502 problem_png=": png library or header not found"
504 $UNSET ac_cv_header_png_h
505 $UNSET ac_cv_lib_png_png_read_info
506 smr_CHECK_LIB(png, png, for coloured or shaped icons,
507 png_read_info, png.h, -lz -lm,)
509 if test x"$png_LIBS" != x; then
510 dnl Check for proper version of png
511 AC_MSG_CHECKING([for libpng 1.0.4a or better])
512 my_CPPFLAGS="$CPPFLAGS"
514 CPPFLAGS="$CPPFLAGS $png_CFLAGS"
515 LIBS="$LIBS $png_LIBS -lz -lm"
516 AC_TRY_RUN([#include <png.h>
517 int main(int c, char **v) {
518 return c == 1 ? 0 : (PNG_LIBPNG_VER < 10005) ? 2 : 0 ;}],
519 [./conftest dummy_arg; png_status=$?;
520 if test x"$png_status" = x0; then
524 if test x"$png_status" = x2; then
525 problem_png=": png library version is too old"
527 problem_png=": Internal png detection logic error"
530 [with_png="no"; problem_png=": png test error, see config.log"])
531 AC_MSG_RESULT($with_png)
532 CPPFLAGS="$my_CPPFLAGS"
536 if test x"$with_png" = xyes; then
546 dnl ** needed by the png support
550 $UNSET ac_cv_header_rplay_h
551 $UNSET ac_cv_lib_rplay_rplay_create
552 dnl Add in X_EXTRA_LIBS here to get things like connect().
553 smr_CHECK_LIB(rplay, , adds audio capability, rplay_create, rplay.h,
555 test x"$rplay_LIBS" != x && AC_DEFINE(HAVE_RPLAY)
557 AC_SUBST(rplay_CFLAGS)
561 $UNSET ac_cv_header_stroke_h
562 $UNSET ac_cv_lib_stroke_stroke_init
563 dnl Add in X_LIBS for MOUSE_DROPPINGS?
564 dnl As of 23/Mar/2000 the only libstroke RPM has /usr/X11R6/include/stroke.h
565 smr_CHECK_LIB(stroke, , mouse strokes recognition,
566 stroke_init, stroke.h,
567 [$X_LIBS -lX11], $X_CFLAGS -I/usr/X11R6/include)
568 test x"$stroke_LIBS" != x && AC_DEFINE(HAVE_STROKE)
569 AC_SUBST(stroke_LIBS)
570 AC_SUBST(stroke_CFLAGS)
573 dnl ********* readline
575 problem_readline=": Both termcap and ncurses disabled"
577 smr_ARG_WITHLIB(termcap, , to accomplish readline)
578 if test x"$with_termcap" != xno; then
579 dnl Forget cached values, so user can re-run configure
580 $UNSET ac_cv_header_readline_history_h
581 $UNSET ac_cv_lib_readline_readline
582 AC_MSG_CHECKING([with termcap])
583 smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h,
585 if test x"$readline_LIBS" != x; then
587 readline_LIBS="$readline_LIBS $termcap_LIBS"
588 AC_DEFINE(HAVE_READLINE)
591 smr_ARG_WITHLIB(ncurses, , to accomplish readline)
592 if test x"$with_ncurses" != xno -a ! "$readline_LIBS"; then
593 # We couldn't use readline with termcap; try with ncurses?
594 dnl Doesn't this seem a hacky way to do this??
595 dnl unset cached values from last check...
596 $UNSET ac_cv_header_readline_history_h
597 $UNSET ac_cv_lib_readline_readline
598 AC_MSG_CHECKING([with ncurses])
599 dnl We can't call smr_CHECK_LIB twice here without having the usage twice...
601 dnl AC_CHECK_LIB(readline, readline, , , $ncurses_LIBS)
603 dnl if test x"$ac_cv_lib_readline_readline" = xyes; then
604 dnl AC_CHECK_HEADERS(readline/history.h)
605 dnl if test x"$ac_cv_header_readline_history_h" = xyes; then
606 dnl with_readline=yes
607 dnl readline_LIBS="$readline_LIBS $ncurses_LIBS"
608 dnl AC_DEFINE(HAVE_READLINE)
611 smr_CHECK_LIB(readline, , line editing/history, readline, readline/history.h,
613 if test x"$readline_LIBS" != x; then
615 readline_LIBS="$readline_LIBS $ncurses_LIBS"
616 AC_DEFINE(HAVE_READLINE)
619 AC_SUBST(readline_LIBS)
620 AC_SUBST(readline_CFLAGS)
623 dnl Check if Xsetlocale() is available or not.
624 AC_CHECK_LIB(X11, _Xsetlocale, AC_DEFINE(X_LOCALE),, $X_LIBS -lX11)
626 dnl Check if Xsetlocale() is available or not.
627 AC_CHECK_LIB(X11, XOpenOM, AC_DEFINE(HAVE_XOUTPUT_METHOD),, $X_LIBS -lX11)
634 problem_iconv=": Explicitly disabled"
637 [ --disable-iconv disable support for iconv character conversion],
638 [ac_cv_iconv="$enableval"],
641 if test x"$ac_cv_iconv" != xno; then
642 dnl * first check for gnu libiconv
643 $UNSET ac_cv_header_libiconv_h
644 $UNSET ac_cv_lib_libiconv_libiconv_open
646 iconv, , if not found sys iconv is used, libiconv_open, iconv.h)
647 if test x"$iconv_LIBS" != x; then
648 AC_DEFINE(USE_LIBICONV)
652 AC_SUBST(iconv_CFLAGS)
654 dnl * check for system iconv
656 AC_CHECK_FUNC(iconv_open, with_sys_iconv=yes)
658 if test x"$with_lib_iconv" = xyes -a x"$with_sys_iconv" = xyes; then
659 AC_MSG_WARN([*** Both system iconv and libiconv found: use libiconv])
660 AC_MSG_WARN([*** Use --with-iconv-library=no to use the system iconv])
663 dnl * libiconv found check for libcharset to get the good iconv charset
664 if test x"$with_lib_iconv" = xyes; then
668 test x"$with_lib_iconv" = xyes -o x"$with_sys_iconv" = xyes &&
669 with_iconv=yes && problem_iconv=""
670 test x"$with_lib_iconv" = xyes && with_iconv_type="yes (libiconv)"
671 test x"$with_sys_iconv" = xyes && with_iconv_type="yes (from C library)"
673 if test x"$with_iconv" = xno; then
675 AC_MSG_WARN([*** No iconv() implementation found in C library or libiconv])
676 AC_MSG_WARN([*** Please install libiconv ftp://ftp.gnu.org/pub/gnu/libiconv/])
680 if test x"$with_iconv" = xyes; then
681 AC_DEFINE(HAVE_ICONV)
687 dnl ******** nl_langinfo and CODESET
688 AC_MSG_CHECKING([for nl_langinfo (CODESET)])
689 AC_TRY_COMPILE([#include <langinfo.h>
690 #include <locale.h>],
691 [char *codeset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "");],
692 AC_DEFINE(HAVE_CODESET,,[Have nl_langinfo (CODESET)])
695 AC_MSG_RESULT($have_codeset)
698 dnl ********* fribidi
700 [ --disable-bidi disable bi-directional text support],
701 [ if test x"$enableval" = xyes; then
702 with_bidi="yes, check"
705 problem_bidi=": Explicitly disabled"
707 [ with_bidi="not specified, check" ]
710 if test x"$with_bidi" != xno; then
711 AC_ARG_WITH(fribidi-bindir,
712 [ --with-fribidi-bindir=DIR directory of fribidi-config if not in PATH],
713 FRIBIDI_BINDIR="$withval", FRIBIDI_BINDIR=".")
714 AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config,, [$FRIBIDI_BINDIR:$PATH])
716 if test x"$FRIBIDI_CONFIG" = x; then
718 problem_bidi=": No fribidi-config found in PATH"
720 Bidi_CFLAGS=`$FRIBIDI_CONFIG --cflags`
721 Bidi_LIBS=`$FRIBIDI_CONFIG --libs`
722 AC_CHECK_LIB(fribidi, fribidi_log2vis,
723 with_bidi=yes; problem_bidi=,
724 with_bidi=no; problem_bidi=": No good libs via fribidi-config",
725 [$Bidi_LIBS $Bidi_CFLAGS])
729 if test x"$with_bidi" != xno; then
732 LIBS="$LIBS $Bidi_LIBS"
733 AC_TRY_RUN([#include <stdlib.h>
734 #include <fribidi/fribidi.h>
737 FriBidiChar *logical_unicode_str =
738 (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
739 fribidi_charset_to_unicode(
740 fribidi_parse_charset("iso8859-8"), "test", 4,
741 logical_unicode_str);
744 ], [:], [fribidi_in_path=no])
746 if test x"$fribidi_in_path" != xyes; then
747 ac_save_CFLAGS="$CFLAGS"
749 CFLAGS="$CFLAGS $Bidi_CFLAGS"
750 LIBS="$LIBS $Bidi_LIBS"
751 AC_TRY_RUN([#include <stdlib.h>
752 #include <fribidi/fribidi.h>
755 FriBidiChar *logical_unicode_str =
756 (FriBidiChar *)malloc((4 + 1) * sizeof(FriBidiChar));
757 fribidi_charset_to_unicode(
758 fribidi_parse_charset("iso8859-8"), "test", 4,
759 logical_unicode_str);
762 ], [:], [with_bidi=no; problem_bidi=": Bad fribidi version, see config.log"])
763 CFLAGS="$ac_save_CFLAGS"
766 if test x"$fribidi_in_path" != xno; then
772 if test x"$with_bidi" = xno; then
779 AC_SUBST(Bidi_CFLAGS)
782 dnl ********* perllib
786 AC_ARG_ENABLE(perllib,
787 [ --disable-perllib disable installing FVWM perl library],
788 [ if test x"$enableval" = xno; then
790 problem_perllib=": Explicitly disabled"
794 AC_SUBST(FVWM_PERLLIB)
797 ALL_LINGUAS="ar de fr sv_SE zh_CN"
799 FVWMTASKBAR_DOMAIN="FvwmTaskBar"
800 FVWMSCRIPT_DOMAIN="FvwmScript"
801 ALL_DOMAINS="$FVWM_DOMAIN $FVWMTASKBAR_DOMAIN $FVWMSCRIPT_DOMAIN"
803 AC_SUBST(ALL_LINGUAS)
804 AC_SUBST(FVWM_DOMAIN)
805 AC_SUBST(FVWMTASKBAR_DOMAIN)
806 AC_SUBST(FVWMSCRIPT_DOMAIN)
807 AC_SUBST(ALL_DOMAINS)
809 LOCALEDIR='${datadir}'"/locale"
814 [ --disable-nls do not use Native Language Support],
815 [ if test x"$enableval" = xno; then
817 problem_gettext=": Explicitly disabled"
821 if test x"$with_gettext" != xno; then
823 if test x"$USE_NLS" = "xyes"; then
824 AC_DEFINE(HAVE_NLS, 1)
827 problem_gettext=": Failed to detected GNU gettext"
835 AC_SUBST(intl_CFLAGS)
839 AC_SUBST(MKINSTALLDIRS)
847 AC_SUBST(INST_LINGUAS)
851 AC_SUBST(UPDATEPOFILES)
852 AC_SUBST(DUMMYPOFILES)
855 dnl Check for REQUIRED headers and functions before going any
858 dnl The module interface uses variadic functions for message passing.
859 AC_CHECK_HEADERS(stdarg.h)
860 AC_CHECK_FUNCS(vfprintf)
861 if test x$ac_cv_header_stdarg_h = xno -o \
862 $ac_cv_func_vfprintf = no; then
863 AC_MSG_ERROR([stdarg.h and vfprintf required])
866 dnl For reaping children, fvwm needs either waitpid() or wait3()
867 dnl Some extra modules may need wait4() too
868 AC_CHECK_FUNCS(waitpid)
869 if test x$ac_cv_func_waitpid = xno; then
870 AC_CHECK_FUNCS(wait3 wait4)
871 if test x$ac_cv_func_wait3 = xno; then
872 AC_MSG_ERROR([Either waitpid or wait3 function is required])
876 dnl Make the C++ compiler optional, for it is only used in
877 dnl modules, not for the main code.
879 dnl Actually, we don't use it at _all_ anymore, since the only module
880 dnl that used it has been removed. It causes problems so we'll comment
881 dnl it out for now. Hopefully by the time we need it again autoconf
882 dnl will handle it better :-/
885 dnl [ --without-cxx disable probing for C++ compiler])
887 dnl if test x"$with_cxx" != xno; then
888 dnl if test x"$with_cxx" != x -a x"$with_cxx" != xyes; then
890 dnl # disable the cached value before probing
891 dnl $UNSET ac_cv_prog_CXX
892 dnl AC_CHECK_PROGS(CXX, $CCC)
893 dnl test x"$CXX" != x ||
894 dnl AC_MSG_ERROR([C++ compiler given by --with-cxx not found])
896 dnl AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++)
898 dnl if test x"$CXX" != x; then
899 dnl AC_MSG_RESULT(Using $CXX to compile C++ programs)
905 dnl Look harder for a C preprocessor for FvwmCpp
906 AC_PATH_PROG(FVWM_CPP, cpp, no, $PATH:/lib:/usr/lib:/usr/ccs/lib)
907 if test x"$FVWM_CPP" = xno; then
909 AC_MSG_WARN([cannot locate a C preprocessor: run FvwmCpp with -cppprog])
911 dnl FIXME: make sure the cpp we found actually works...
913 dnl Finish checking for programs.
918 dnl lex+yacc now only needed for FvwmScript developers when syntax is changed
922 REQUIRED_PERL_VERSION=5.004
923 AC_SUBST(REQUIRED_PERL_VERSION)
925 if test x"$PERL" = x; then
926 AC_PATH_PROG(PERL, perl)
928 if test x"$PERL" != x; then
929 AC_MSG_CHECKING([for perl $REQUIRED_PERL_VERSION or better])
930 if ("$PERL" -e "require $REQUIRED_PERL_VERSION;") 2>/dev/null; then
934 AC_MSG_WARN([$PERL not found or too old])
937 AC_MSG_WARN([perl is not found, it is required for some scripts and modules])
938 AC_MSG_WARN([It is recommended to install perl $REQUIRED_PERL_VERSION or better later])
941 AC_MSG_RESULT([assuming $PERL as perl location])
944 dnl Checks for header files.
947 AC_CHECK_HEADERS(stdlib.h fcntl.h limits.h malloc.h string.h memory.h unistd.h)
948 AC_CHECK_HEADERS(getopt.h sys/select.h sys/systeminfo.h sys/time.h)
950 dnl Checks for typedefs, structures, and compiler characteristics.
959 dnl Checks for library functions.
964 AC_CHECK_FUNCS(gettimeofday mkfifo putenv setvbuf socket waitpid)
965 AC_CHECK_FUNCS(strdup strstr strtol memmove memcpy strchr sysconf uname div)
966 AC_CHECK_FUNCS(sigaction siginterrupt getpwuid)
967 AC_CHECK_FUNCS(setpgrp setpgid)
971 pds_CHECK_TYPE(sig_atomic_t, int, [#include <signal.h>])
973 if test x$ac_cv_func_setvbuf = xyes; then
974 AC_FUNC_SETVBUF_REVERSED
978 if test x$ac_cv_func_select != xyes; then
979 AC_MSG_ERROR([select required])
982 dnl Check for standard functions that we have replacements for.
983 AC_REPLACE_FUNCS(gethostname strcasecmp strncasecmp strdup strerror usleep atexit)
984 dnl dv: this is harmful with autoconf 2.53 and is done automatically anyway
985 dnl AC_SUBST(LIBOBJS)
987 dnl check for mkstemp, see the discution on this subject on the fvwm workers
988 dnl list (2001-02-16 and 2001-02-24)
989 AM_SAFTY_CHECK_MKSTEMP
991 dnl If we do not have atexit(), then check for on_exit()
992 if test x$ac_cv_func_atexit = xno; then
993 AC_CHECK_FUNCS(on_exit)
996 dnl Check for unsetenv function
997 AC_CHECK_FUNCS(unsetenv)
1000 dnl ********* GTK, IMLIB, GNOME
1001 dnl Check the availability of gtk
1006 [ --disable-gtk do not build modules using gtk library],
1007 enable_gtktest="$enableval", enable_gtktest=yes)
1008 if test x"$enable_gtktest" = xyes; then
1010 FVWMGTK=FvwmGtk AC_SUBST(FVWMGTK)
1011 MANFVWMGTK=FvwmGtk.1 AC_SUBST(MANFVWMGTK)
1013 if test x"$no_gtk" = x; then
1018 problem_gtk=": Failed to detect GTK, see config.log"
1022 problem_gtk=": Explicitly disabled"
1025 AC_SUBST(MANFVWMGTK)
1027 dnl Check the availability of gdk-imlib
1028 AM_PATH_GDK_IMLIB(1.8.0, AC_DEFINE(GDK_IMLIB),)
1029 if test x"$no_imlib" = x; then
1034 problem_gdkimlib=": Failed on gdk-imlib, see config.log"
1039 dnl Unfortunately we have 2 gnome supports: WM hints and gnome libs.
1040 dnl The $with_gnomehints below refers to the first, not GNOME_INIT_HOOK.
1041 if test x"$enable_gnome_hints" != xno; then
1043 problem_gnomehints=""
1046 problem_gnomehints=": Explicitly disabled"
1049 dnl Define some compatibility macros needed for acconfig.h.
1050 mg_DEFINE_IF_NOT([#include <X11/keysym.h>],
1051 [defined XK_Page_Up && defined XK_Page_Down],
1052 [COMPAT_OLD_KEYSYMDEF], [$X_CFLAGS])
1054 if test x"$with_stroke" = xyes; then
1055 mg_DEFINE_IF_NOT([#include <stroke.h>],
1056 [defined STROKE_MAX_SEQUENCE],
1057 [COMPAT_OLD_LIBSTROKE], [$stroke_CFLAGS])
1061 dnl Allow building with dmalloc. Do this last to avoid screwing up any
1062 dnl other checks above.
1064 case "$ac_cv_dmalloc" in
1065 yes) AC_CHECK_HEADERS(dmalloc.h)
1066 AC_CHECK_LIB(dmalloc, dmalloc_shutdown)
1067 CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK" ;;
1071 dnl Allow building with efence.
1073 case "$ac_cv_efence" in
1074 yes) AC_CHECK_LIB(efence, malloc) ;;
1078 # mainly for fvwm-config
1081 AC_SUBST(with_gdkimlib)
1082 AC_SUBST(with_gettext)
1083 AC_SUBST(with_gnomelibs)
1084 AC_SUBST(with_iconv)
1085 AC_SUBST(with_perllib)
1087 AC_SUBST(with_readline)
1088 AC_SUBST(with_rplay)
1089 AC_SUBST(with_shape)
1092 AC_SUBST(with_stroke)
1094 AC_SUBST(with_xinerama)
1095 AC_SUBST(with_xrender)
1098 LOCAL_BUGADDR=${FVWM_BUGADDR-${USER-${LOGNAME-`whoami`}}}
1099 AC_SUBST(LOCAL_BUGADDR)
1109 bin/fvwm-convert-2.2.1
1110 bin/fvwm-convert-2.4.1
1111 bin/fvwm-convert-2.6.1
1112 bin/fvwm-menu-desktop.1
1113 dnl bin/fvwm-menu-directory.1
1114 dnl bin/fvwm-menu-headlines.1
1115 dnl bin/fvwm-menu-xlock.1
1116 dnl bin/fvwm-perllib.1
1119 modules/FvwmAnimate/FvwmAnimate.1
1120 modules/FvwmAuto/FvwmAuto.1
1121 modules/FvwmBacker/FvwmBacker.1
1122 modules/FvwmBanner/FvwmBanner.1
1123 modules/FvwmButtons/FvwmButtons.1
1124 modules/FvwmCommand/FvwmCommand.1
1125 modules/FvwmConsole/FvwmConsole.1
1126 modules/FvwmConsole/FvwmConsoleC.pl.1
1127 modules/FvwmCpp/FvwmCpp.1
1128 dnl modules/FvwmDebug/FvwmDebug.1
1129 dnl modules/FvwmDebug/FvwmGtkDebug.1
1130 dnl modules/FvwmDebug/FvwmOldDebug.1
1131 modules/FvwmDragWell/FvwmDragWell.1
1132 modules/FvwmEvent/FvwmEvent.1
1133 modules/FvwmForm/FvwmForm.1
1134 modules/FvwmGtk/FvwmGtk.1
1135 modules/FvwmIconBox/FvwmIconBox.1
1136 modules/FvwmIconMan/FvwmIconMan.1
1137 modules/FvwmIdent/FvwmIdent.1
1138 modules/FvwmM4/FvwmM4.1
1139 modules/FvwmPager/FvwmPager.1
1140 dnl modules/FvwmPerl/FvwmPerl.1
1141 modules/FvwmProxy/FvwmProxy.1
1142 modules/FvwmRearrange/FvwmRearrange.1
1143 modules/FvwmSave/FvwmSave.1
1144 modules/FvwmSaveDesk/FvwmSaveDesk.1
1145 modules/FvwmScript/FvwmScript.1
1146 modules/FvwmScroll/FvwmScroll.1
1147 modules/FvwmTaskBar/FvwmTaskBar.1
1148 modules/FvwmTheme/FvwmTheme.1
1149 modules/FvwmWharf/FvwmWharf.1
1150 modules/FvwmWinList/FvwmWinList.1
1151 dnl modules/FvwmWindowMenu/FvwmWindowMenu.1
1158 bin/fvwm-menu-directory
1159 bin/fvwm-menu-desktop
1160 bin/fvwm-menu-headlines
1161 bin/fvwm-convert-2.4
1162 bin/fvwm-convert-2.6
1166 perllib/General/Makefile
1167 perllib/FVWM/Makefile
1168 perllib/FVWM/Module/Makefile
1169 perllib/FVWM/Tracker/Makefile
1170 perllib/FVWM/Module.pm
1177 sample.fvwmrc/Makefile
1179 tests/hints/Makefile
1182 modules/FvwmAnimate/Makefile
1183 modules/FvwmAuto/Makefile
1184 modules/FvwmBacker/Makefile
1185 modules/FvwmBanner/Makefile
1186 modules/FvwmButtons/Makefile
1187 modules/FvwmCommand/Makefile
1188 modules/FvwmCommand/scripts/Makefile
1189 modules/FvwmConsole/Makefile
1190 modules/FvwmConsole/FvwmConsoleC.pl
1191 modules/FvwmCpp/Makefile
1192 modules/FvwmDebug/Makefile
1193 modules/FvwmDebug/FvwmDebug
1194 modules/FvwmDebug/FvwmGtkDebug
1195 modules/FvwmDragWell/Makefile
1196 modules/FvwmEvent/Makefile
1197 modules/FvwmForm/Makefile
1198 modules/FvwmIconBox/Makefile
1199 modules/FvwmIconMan/Makefile
1200 modules/FvwmIdent/Makefile
1201 modules/FvwmM4/Makefile
1202 modules/FvwmPager/Makefile
1203 modules/FvwmPerl/Makefile
1204 modules/FvwmPerl/FvwmPerl
1205 modules/FvwmProxy/Makefile
1206 modules/FvwmRearrange/Makefile
1207 modules/FvwmSave/Makefile
1208 modules/FvwmSaveDesk/Makefile
1209 modules/FvwmScript/Makefile
1210 modules/FvwmScript/Scripts/Makefile
1211 modules/FvwmScript/Widgets/Makefile
1212 modules/FvwmScroll/Makefile
1213 modules/FvwmTaskBar/Makefile
1214 modules/FvwmTheme/Makefile
1215 modules/FvwmWharf/Makefile
1216 modules/FvwmWinList/Makefile
1217 modules/FvwmWindowMenu/Makefile
1218 modules/FvwmWindowMenu/FvwmWindowMenu
1219 modules/FvwmGtk/Makefile
1222 # ---------------------------------------------------------------------------
1223 # Original config.status is patched to make generated scripts executable.
1224 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 && \
1225 mv config.status-t config.status
1226 chmod +x config.status
1227 # ---------------------------------------------------------------------------
1229 # ---------------------------------------------------------------------------
1230 cat >config.status-t <<EOF
1233 # Original config.status is patched to satisfy processing *.in with 'make -j'.
1234 # This bug seems to be partially fixed in autoconf-2.50 (not in all places).
1238 sed 's/conftest/conftest\${UNIQUE_POSTFIX}/g' <config.status >>config.status-t && \
1239 mv config.status-t config.status
1240 chmod +x config.status
1241 # ---------------------------------------------------------------------------
1243 eval my_bindir="`eval echo ${bindir}`"
1244 eval my_mandir="`eval echo ${mandir}`"
1245 eval my_moddir="`eval echo ${FVWM_MODULEDIR}`"; eval my_moddir="$my_moddir"
1246 eval my_datdir="`eval echo ${FVWM_DATADIR}`"
1247 eval my_plldir="`eval echo ${FVWM_PERLLIBDIR}`"
1248 test x"$FVWM_PERLLIB" = x && my_plldir="(Not installed) $my_plldir"
1249 eval my_localedir="`eval echo ${LOCALEDIR}`"
1250 test x"$USE_NLS" = xno && my_localedir="(Not installed) $my_localdir"
1254 With GDK image support in FvwmGtk? $with_gdkimlib$problem_gdkimlib
1255 With GNOME libs support in FvwmGtk? $with_gnomelibs$problem_gnomelibs" ;;
1256 no) fvwmgtk_msg="" ;;
1262 Version: $VERSION$VERSIONINFO
1264 Executables: $my_bindir
1265 Man pages: $my_mandir
1267 Data files: $my_datdir
1268 Perl lib: $my_plldir
1269 Locale msg: $my_localedir $INST_LINGUAS
1271 With Asian bi-direct. text support? $with_bidi$problem_bidi
1272 With Gettext Native Lang support? $with_gettext$problem_gettext
1273 With GTK+ required for FvwmGtk? $with_gtk$problem_gtk$fvwmgtk_msg
1274 With Iconv support? $with_iconv_type$problem_iconv
1275 With Mouse strokes (gestures)? $with_stroke$problem_stroke
1276 With PNG image support? $with_png$problem_png
1277 With ReadLine sup. in FvwmConsole? $with_readline$problem_readline
1278 With RPlay support in FvwmEvent? $with_rplay$problem_rplay
1279 With Shaped window support? $with_shape$problem_shape
1280 With Shared memory for XImage? $with_shm$problem_shm
1281 With Session Management support? $with_sm$problem_sm
1282 With Xinerama multi-head support? $with_xinerama$problem_xinerama
1283 With Xft anti-alias font support? $with_xft$problem_xft
1284 With XPM image support? $with_xpm$problem_xpm
1285 With Xrender image support? $with_xrender$problem_xrender
1287 See INSTALL.fvwm for the description of what this may mean."
1289 case "$with_xinerama_emulation" in
1290 yes) echo " Xinerama emulation enabled." ;;
1292 case "$ac_cv_dmalloc" in
1293 yes) echo " DMALLOC heap debugging library enabled." ;;
1295 case "$ac_cv_efence" in
1296 yes) echo " EFENCE debugging library enabled." ;;