1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
16 dnl WM_CHECK_LIB(NAME, FUNCTION, EXTRALIBS)
18 AC_DEFUN(WM_CHECK_LIB,
20 LDFLAGS_old="$LDFLAGS"
21 LDFLAGS="$LDFLAGS $lib_search_path"
22 AC_CHECK_LIB([$1],[$2],yes=yes,no=no,[$3])
23 LDFLAGS="$LDFLAGS_old"
28 dnl WM_CHECK_HEADER(NAME)
30 AC_DEFUN(WM_CHECK_HEADER,
32 CPPFLAGS_old="$CPPFLAGS"
33 CPPFLAGS="$CPPFLAGS $inc_search_path"
35 CPPFLAGS="$CPPFLAGS_old"
40 dnl WM_CHECK_REDCRAP_BUGS(prefix,bindir,libdir)
42 AC_DEFUN(WM_CHECK_REDCRAP_BUGS,
44 AC_MSG_CHECKING(for RedHat system)
47 if test -f /etc/redhat-release; then
51 AC_MSG_RESULT($wm_check_flag)
55 if test "$wm_check_flag" = yes; then
57 AC_MSG_WARN([Red Hat system; checking for Red-Hat-specific bugs.])
60 # Check old wmaker from RedHat
62 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
63 AC_MSG_CHECKING(for multiple installed wmaker versions)
64 if test -f /usr/X11R6/bin/wmaker; then
70 AC_MSG_RESULT(no apparent problems)
74 # Check for infamous en_RN bug
75 # Wont work because autoconf will change LANG in the beginning of the
79 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
81 #if test "x$LANG" = xen_RN; then
83 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
84 #locale. Please unset it or you will have mysterious problems when
85 #using various software packages.])
88 #AC_MSG_RESULT(no problem)
91 # If binary installation path is /usr/local/bin, check if it's in PATH
93 if test "[$2]" = "/usr/local/bin"; then
94 AC_MSG_CHECKING(if /usr/local/bin is in the search PATH)
96 rh_missing_usr_local_bin=yes
100 if test "x$i" = "x/usr/local/bin"; then
102 rh_missing_usr_local_bin=no
107 if test "$wm_check_flag" = no; then
111 AC_MSG_RESULT(no problem)
115 # If library installation path is /usr/local/lib,
116 # check if it's in /etc/ld.so.conf
118 if test "[$3]" = "/usr/local/lib"; then
120 rh_missing_usr_local_lib=no
121 AC_MSG_CHECKING(if /usr/local/lib is in /etc/ld.so.conf)
122 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
123 test "$?" -eq 0 && wm_check_flag=no
124 if test "$wm_check_flag" = no; then
126 rh_missing_usr_local_lib=yes
129 AC_MSG_RESULT(no problem)
133 # Check for symbolic links
135 AC_MSG_CHECKING(for /usr/X11 symbolic link)
136 rh_missing_usr_x11=no
137 if test -d "/usr/X11"; then
141 rh_missing_usr_x11=yes
144 AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
145 rh_missing_usr_include_x11=no
146 if test -d "/usr/include/X11"; then
150 rh_missing_usr_include_x11=yes
157 AC_MSG_CHECKING(for /lib/cpp)
158 rh_missing_lib_cpp=no
159 if test -f "/lib/cpp"; then
163 rh_missing_lib_cpp=yes
173 dnl WM_PRINT_REDCRAP_BUG_STATUS()
175 AC_DEFUN(WM_PRINT_REDCRAP_BUG_STATUS,
177 if test "$rh_is_redhat" = yes; then
178 if test "$mins_found" = yes -o "$bugs_found" = yes; then
180 AC_MSG_WARN([It seems you are using a system packaged by Red Hat.
181 I have done some checks for Red-Hat-specific bugs, and I found some
182 problems. Please read the INSTALL file regarding Red Hat, resolve
183 the problems, and try to run configure again.
185 Here are the problems I found:
187 if test "x$rh_old_wmaker" = xyes; then
188 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
189 echo "Description: You seem to have an old version of Window Maker"
190 echo " installed in /usr/X11R6/bin. It is recommended"
191 echo " that you uninstall any previously installed"
192 echo " packages of WindowMaker before installing a new one."
195 if test "x$rh_missing_usr_local_bin" = xyes; then
196 echo "Problem: PATH is missing /usr/local/bin."
197 echo "Description: Your PATH environment variable does not appear to"
198 echo " contain the directory /usr/local/bin. Please add it."
201 if test "x$rh_missing_usr_local_lib" = xyes; then
202 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
203 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
204 echo " the directory /usr/local/lib. Please add it."
207 if test "x$rh_missing_usr_x11" = xyes; then
208 echo "Problem: Missing /usr/X11 symbolic link."
209 echo "Description: Your system is missing a symbolic link from"
210 echo " /usr/X11R6 to /usr/X11. Please create one."
213 if test "x$rh_missing_usr_include_x11" = xyes; then
214 echo "Problem: Missing /usr/include/X11 symbolic link."
215 echo "Description: Your system is missing a symbolic link from"
216 echo " /usr/X11R6/include/X11 to /usr/include/X11."
217 echo " Please create one."
220 if test "x$rh_missing_lib_cpp" = xyes; then
221 echo "Problem: Missing /lib/cpp symbolic link."
222 echo "Description: Your system is missing a symbolic link from the"
223 echo " cpp (C preprocessor) program to /lib/cpp."
224 echo " Please create one."
227 if test "x$bugs_found" = xyes; then
228 AC_MSG_ERROR([One or more of the problems above can potentially
229 cause Window Maker not to install or run properly. Please resolve
230 the problems and try to run configure again.])
232 elif test "x$mins_found" = xyes; then
233 AC_MSG_WARN([The problems above may or may not cause Window Maker
234 not to install or run properly. If you have any problems during
235 installation or execution, please resolve the problems and try to
236 install Window Maker again.])
241 echo "You appear to have a system packaged by Red Hat, but I could"
242 echo "not find any Red-Hat-specific problems that I know about."
249 # Do all the work for Automake. This macro actually does too much --
250 # some checks are only needed if your package does certain things.
251 # But this isn't really a big deal.
256 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
258 AC_DEFUN(AM_INIT_AUTOMAKE,
259 [AC_REQUIRE([AC_PROG_INSTALL])
264 dnl test to see if srcdir already configured
265 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
266 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
269 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
270 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
271 AC_REQUIRE([AM_SANITY_CHECK])
272 AC_REQUIRE([AC_ARG_PROGRAM])
273 dnl FIXME This is truly gross.
274 missing_dir=`cd $ac_aux_dir && pwd`
275 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
276 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
277 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
278 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
279 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
280 AC_REQUIRE([AC_PROG_MAKE_SET])])
283 # Check to make sure that the build environment is sane.
286 AC_DEFUN(AM_SANITY_CHECK,
287 [AC_MSG_CHECKING([whether build environment is sane])
290 echo timestamp > conftestfile
291 # Do `set' in a subshell so we don't clobber the current shell's
292 # arguments. Must try -L first in case configure is actually a
293 # symlink; some systems play weird games with the mod time of symlinks
294 # (eg FreeBSD returns the mod time of the symlink's containing
297 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
298 if test "[$]*" = "X"; then
300 set X `ls -t $srcdir/configure conftestfile`
302 if test "[$]*" != "X $srcdir/configure conftestfile" \
303 && test "[$]*" != "X conftestfile $srcdir/configure"; then
305 # If neither matched, then we have a broken ls. This can happen
306 # if, for instance, CONFIG_SHELL is bash and it inherits a
307 # broken ls alias from the environment. This has actually
308 # happened. Such a system could not be considered "sane".
309 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
310 alias in your environment])
313 test "[$]2" = conftestfile
319 AC_MSG_ERROR([newly created file is older than distributed files!
320 Check your system clock])
325 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
326 dnl The program must properly implement --version.
327 AC_DEFUN(AM_MISSING_PROG,
328 [AC_MSG_CHECKING(for working $2)
329 # Run test in a subshell; some versions of sh will print an error if
330 # an executable is not found, even if stderr is redirected.
331 # Redirect stdin to placate older versions of autoconf. Sigh.
332 if ($2 --version) < /dev/null > /dev/null 2>&1; then
337 AC_MSG_RESULT(missing)
342 # serial 24 AM_PROG_LIBTOOL
343 AC_DEFUN(AM_PROG_LIBTOOL,
344 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
345 AC_REQUIRE([AM_ENABLE_STATIC])dnl
346 AC_REQUIRE([AC_CANONICAL_HOST])dnl
347 AC_REQUIRE([AC_PROG_RANLIB])dnl
348 AC_REQUIRE([AC_PROG_CC])dnl
349 AC_REQUIRE([AM_PROG_LD])dnl
350 AC_REQUIRE([AM_PROG_NM])dnl
351 AC_REQUIRE([AC_PROG_LN_S])dnl
353 # Always use our own libtool.
354 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
357 # Check for any special flags to pass to ltconfig.
359 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
360 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
361 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
362 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
363 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
365 # Some flags need to be propagated to the compiler or linker for good
369 # Find out which ABI we are using.
370 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
371 if AC_TRY_EVAL(ac_compile); then
372 case "`/usr/bin/file conftest.o`" in
388 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
389 CFLAGS="$CFLAGS -belf"
393 # Actually configure libtool. ac_aux_dir is where install-sh is found.
394 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
395 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
396 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
397 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
398 || AC_MSG_ERROR([libtool configure failed])
401 # AM_ENABLE_SHARED - implement the --enable-shared flag
402 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
403 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
405 AC_DEFUN(AM_ENABLE_SHARED,
406 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
407 AC_ARG_ENABLE(shared,
408 changequote(<<, >>)dnl
409 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
411 [ --enable-shared=PKGS only build shared libraries if the current package
412 appears as an element in the PKGS list],
413 [p=${PACKAGE-default}
415 yes) enable_shared=yes ;;
416 no) enable_shared=no ;;
419 # Look at the argument we got. We use all the common list separators.
420 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
421 for pkg in $enableval; do
422 if test "X$pkg" = "X$p"; then
429 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
432 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
433 AC_DEFUN(AM_DISABLE_SHARED,
434 [AM_ENABLE_SHARED(no)])
436 # AM_DISABLE_STATIC - set the default static flag to --disable-static
437 AC_DEFUN(AM_DISABLE_STATIC,
438 [AM_ENABLE_STATIC(no)])
440 # AM_ENABLE_STATIC - implement the --enable-static flag
441 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
442 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
444 AC_DEFUN(AM_ENABLE_STATIC,
445 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
446 AC_ARG_ENABLE(static,
447 changequote(<<, >>)dnl
448 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
450 [ --enable-static=PKGS only build shared libraries if the current package
451 appears as an element in the PKGS list],
452 [p=${PACKAGE-default}
454 yes) enable_static=yes ;;
455 no) enable_static=no ;;
458 # Look at the argument we got. We use all the common list separators.
459 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
460 for pkg in $enableval; do
461 if test "X$pkg" = "X$p"; then
468 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
472 # AM_PROG_LD - find the path to the GNU or non-GNU linker
475 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
476 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
477 AC_REQUIRE([AC_PROG_CC])
479 if test "$ac_cv_prog_gcc" = yes; then
480 # Check if gcc -print-prog-name=ld gives a path.
481 AC_MSG_CHECKING([for ld used by GCC])
482 ac_prog=`($CC -print-prog-name=ld) 2>&5`
484 # Accept absolute paths.
486 test -z "$LD" && LD="$ac_prog"
489 # If it fails, then pretend we aren't using GCC.
493 # If it is relative, then search for the first ld in PATH.
497 elif test "$with_gnu_ld" = yes; then
498 AC_MSG_CHECKING([for GNU ld])
500 AC_MSG_CHECKING([for non-GNU ld])
502 AC_CACHE_VAL(ac_cv_path_LD,
503 [if test -z "$LD"; then
504 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
505 for ac_dir in $PATH; do
506 test -z "$ac_dir" && ac_dir=.
507 if test -f "$ac_dir/$ac_prog"; then
508 ac_cv_path_LD="$ac_dir/$ac_prog"
509 # Check to see if the program is GNU ld. I'd rather use --version,
510 # but apparently some GNU ld's only accept -v.
511 # Break only if it was the GNU/non-GNU ld that we prefer.
512 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
513 test "$with_gnu_ld" != no && break
515 test "$with_gnu_ld" != yes && break
521 ac_cv_path_LD="$LD" # Let the user override the test with a path.
524 if test -n "$LD"; then
529 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
534 AC_DEFUN(AM_PROG_LD_GNU,
535 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
536 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
537 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
538 ac_cv_prog_gnu_ld=yes
544 # AM_PROG_NM - find the path to a BSD-compatible name lister
546 [AC_MSG_CHECKING([for BSD-compatible nm])
547 AC_CACHE_VAL(ac_cv_path_NM,
550 ac_cv_path_NM="$NM" # Let the user override the test with a path.
553 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
554 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
555 test -z "$ac_dir" && ac_dir=.
556 if test -f $ac_dir/nm; then
557 # Check to see if the nm accepts a BSD-compat flag.
558 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
559 # nm: unknown option "B" ignored
560 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
561 ac_cv_path_NM="$ac_dir/nm -B"
562 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
563 ac_cv_path_NM="$ac_dir/nm -p"
565 ac_cv_path_NM="$ac_dir/nm"
571 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
579 # Like AC_CONFIG_HEADER, but automatically create stamp file.
581 AC_DEFUN(AM_CONFIG_HEADER,
583 AC_CONFIG_HEADER([$1])
584 dnl When config.status generates a header, we must update the stamp-h file.
585 dnl This file resides in the same directory as the config header
586 dnl that is generated. We must strip everything past the first ":",
587 dnl and everything past the last "/".
588 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
589 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
590 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
592 for am_file in <<$1>>; do
593 case " <<$>>CONFIG_HEADERS " in
594 *" <<$>>am_file "*<<)>>
595 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
598 am_indx=`expr "<<$>>am_indx" + 1`