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="-DBEGIN $LDFLAGS -DEND $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)
46 if test -f /etc/redhat-release; then
49 AC_MSG_RESULT($wm_check_flag)
53 if test "$wm_check_flag" = yes; then
55 AC_MSG_WARN([it seems you are using a system packaged by RedHat.
56 I will now do some checks for RedHat specific bugs. If some check
57 fail, please read the INSTALL file regarding RedHat, resolve the
58 problem and retry to configure.])
61 # Check old wmaker from RedHat
63 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
64 AC_MSG_CHECKING(for multiple installed wmaker versions)
65 if test -f /usr/X11R6/bin/wmaker; then
67 AC_MSG_WARN([you seem to have an old version of Window Maker
68 installed at /usr/X11R6/bin. It is recommended that you uninstall
69 any previously installed packages of WindowMaker before installing
73 AC_MSG_RESULT(no apparent problems)
77 # Check for infamous en_RN bug
78 # Wont work because autoconf will change LANG in the beginning of the
82 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
84 #if test "x$LANG" = xen_RN; then
86 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
87 #locale. Please unset it or you will have mysterious problems when
88 #using various software packages.])
91 #AC_MSG_RESULT(no problem)
94 # If binary installation path is /usr/local/bin, check if it's in PATH
96 if test "[$2]" = "/usr/local/bin"; then
97 AC_MSG_CHECKING(if /usr/local/bin is in the search PATH)
102 if test "x$i" = "x/usr/local/bin"; then
108 if test "$wm_check_flag" = no; then
110 AC_MSG_WARN([/usr/local/bin is not in the PATH environment variable.
111 Please resolve the problem.])
114 AC_MSG_RESULT(no problem)
118 # If library installation path is /usr/local/lib,
119 # check if it's in /etc/ld.so.conf
121 if test "[$3]" = "/usr/local/lib"; then
123 AC_MSG_CHECKING(if /usr/local/lib is in /etc/ld.so.conf)
124 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
125 test "$?" -eq 0 && wm_check_flag=no
126 if test "$wm_check_flag" = no; then
128 AC_MSG_WARN([/usr/local/lib is not in the /etc/ld.so.conf file.
129 Please add it there.])
132 AC_MSG_RESULT(no problem)
136 # Check for symbolic links
138 AC_MSG_CHECKING(for /usr/X11 symbolic link)
139 if test -d "/usr/X11"; then
143 AC_MSG_WARN([Please create a symbolic link from /usr/X11R6 to /usr/X11.])
146 AC_MSG_CHECKING(for /usr/include/X11 symbolic link)
147 if test -d "/usr/include/X11"; then
151 AC_MSG_WARN([Please create a symbolic link from /usr/X11R6/include/X11
152 to /usr/include/X11.])
159 AC_MSG_CHECKING(for /lib/cpp)
160 if test -f "/lib/cpp"; then
164 AC_MSG_WARN([Please create a symbolic link from the cpp (C preprocessor)
165 program to /lib/cpp])
169 if test "x$bugs_found" = xyes; then
170 AC_MSG_ERROR([Some bugs that can potentially cause problems during
171 installation/execution were found. Please correct these problems
174 elif test "x$mins_found" = xyes; then
175 AC_MSG_WARN([Some minor problems that might or might not cause
176 problems were found. If you have any problems during
177 installation/execution, please resolve the pointed problems and try
179 echo "Press <Return> to continue."
183 echo "None of the RedHat problems known to this script were found."
190 # Do all the work for Automake. This macro actually does too much --
191 # some checks are only needed if your package does certain things.
192 # But this isn't really a big deal.
197 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
199 AC_DEFUN(AM_INIT_AUTOMAKE,
200 [AC_REQUIRE([AC_PROG_INSTALL])
205 dnl test to see if srcdir already configured
206 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
207 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
210 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
211 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
212 AC_REQUIRE([AM_SANITY_CHECK])
213 AC_REQUIRE([AC_ARG_PROGRAM])
214 dnl FIXME This is truly gross.
215 missing_dir=`cd $ac_aux_dir && pwd`
216 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
217 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
218 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
219 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
220 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
221 AC_REQUIRE([AC_PROG_MAKE_SET])])
224 # Check to make sure that the build environment is sane.
227 AC_DEFUN(AM_SANITY_CHECK,
228 [AC_MSG_CHECKING([whether build environment is sane])
231 echo timestamp > conftestfile
232 # Do `set' in a subshell so we don't clobber the current shell's
233 # arguments. Must try -L first in case configure is actually a
234 # symlink; some systems play weird games with the mod time of symlinks
235 # (eg FreeBSD returns the mod time of the symlink's containing
238 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
239 if test "[$]*" = "X"; then
241 set X `ls -t $srcdir/configure conftestfile`
243 if test "[$]*" != "X $srcdir/configure conftestfile" \
244 && test "[$]*" != "X conftestfile $srcdir/configure"; then
246 # If neither matched, then we have a broken ls. This can happen
247 # if, for instance, CONFIG_SHELL is bash and it inherits a
248 # broken ls alias from the environment. This has actually
249 # happened. Such a system could not be considered "sane".
250 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
251 alias in your environment])
254 test "[$]2" = conftestfile
260 AC_MSG_ERROR([newly created file is older than distributed files!
261 Check your system clock])
266 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
267 dnl The program must properly implement --version.
268 AC_DEFUN(AM_MISSING_PROG,
269 [AC_MSG_CHECKING(for working $2)
270 # Run test in a subshell; some versions of sh will print an error if
271 # an executable is not found, even if stderr is redirected.
272 # Redirect stdin to placate older versions of autoconf. Sigh.
273 if ($2 --version) < /dev/null > /dev/null 2>&1; then
278 AC_MSG_RESULT(missing)
283 # serial 24 AM_PROG_LIBTOOL
284 AC_DEFUN(AM_PROG_LIBTOOL,
285 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
286 AC_REQUIRE([AM_ENABLE_STATIC])dnl
287 AC_REQUIRE([AC_CANONICAL_HOST])dnl
288 AC_REQUIRE([AC_PROG_RANLIB])dnl
289 AC_REQUIRE([AC_PROG_CC])dnl
290 AC_REQUIRE([AM_PROG_LD])dnl
291 AC_REQUIRE([AM_PROG_NM])dnl
292 AC_REQUIRE([AC_PROG_LN_S])dnl
294 # Always use our own libtool.
295 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
298 # Check for any special flags to pass to ltconfig.
300 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
301 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
302 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
303 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
304 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
306 # Some flags need to be propagated to the compiler or linker for good
310 # Find out which ABI we are using.
311 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
312 if AC_TRY_EVAL(ac_compile); then
313 case "`/usr/bin/file conftest.o`" in
329 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
330 CFLAGS="$CFLAGS -belf"
334 # Actually configure libtool. ac_aux_dir is where install-sh is found.
335 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
336 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
337 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
338 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
339 || AC_MSG_ERROR([libtool configure failed])
342 # AM_ENABLE_SHARED - implement the --enable-shared flag
343 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
344 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
346 AC_DEFUN(AM_ENABLE_SHARED,
347 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
348 AC_ARG_ENABLE(shared,
349 changequote(<<, >>)dnl
350 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
352 [ --enable-shared=PKGS only build shared libraries if the current package
353 appears as an element in the PKGS list],
354 [p=${PACKAGE-default}
356 yes) enable_shared=yes ;;
357 no) enable_shared=no ;;
360 # Look at the argument we got. We use all the common list separators.
361 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
362 for pkg in $enableval; do
363 if test "X$pkg" = "X$p"; then
370 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
373 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
374 AC_DEFUN(AM_DISABLE_SHARED,
375 [AM_ENABLE_SHARED(no)])
377 # AM_DISABLE_STATIC - set the default static flag to --disable-static
378 AC_DEFUN(AM_DISABLE_STATIC,
379 [AM_ENABLE_STATIC(no)])
381 # AM_ENABLE_STATIC - implement the --enable-static flag
382 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
383 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
385 AC_DEFUN(AM_ENABLE_STATIC,
386 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
387 AC_ARG_ENABLE(static,
388 changequote(<<, >>)dnl
389 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
391 [ --enable-static=PKGS only build shared libraries if the current package
392 appears as an element in the PKGS list],
393 [p=${PACKAGE-default}
395 yes) enable_static=yes ;;
396 no) enable_static=no ;;
399 # Look at the argument we got. We use all the common list separators.
400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
401 for pkg in $enableval; do
402 if test "X$pkg" = "X$p"; then
409 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
413 # AM_PROG_LD - find the path to the GNU or non-GNU linker
416 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
417 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
418 AC_REQUIRE([AC_PROG_CC])
420 if test "$ac_cv_prog_gcc" = yes; then
421 # Check if gcc -print-prog-name=ld gives a path.
422 AC_MSG_CHECKING([for ld used by GCC])
423 ac_prog=`($CC -print-prog-name=ld) 2>&5`
425 # Accept absolute paths.
427 test -z "$LD" && LD="$ac_prog"
430 # If it fails, then pretend we aren't using GCC.
434 # If it is relative, then search for the first ld in PATH.
438 elif test "$with_gnu_ld" = yes; then
439 AC_MSG_CHECKING([for GNU ld])
441 AC_MSG_CHECKING([for non-GNU ld])
443 AC_CACHE_VAL(ac_cv_path_LD,
444 [if test -z "$LD"; then
445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
446 for ac_dir in $PATH; do
447 test -z "$ac_dir" && ac_dir=.
448 if test -f "$ac_dir/$ac_prog"; then
449 ac_cv_path_LD="$ac_dir/$ac_prog"
450 # Check to see if the program is GNU ld. I'd rather use --version,
451 # but apparently some GNU ld's only accept -v.
452 # Break only if it was the GNU/non-GNU ld that we prefer.
453 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
454 test "$with_gnu_ld" != no && break
456 test "$with_gnu_ld" != yes && break
462 ac_cv_path_LD="$LD" # Let the user override the test with a path.
465 if test -n "$LD"; then
470 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
475 AC_DEFUN(AM_PROG_LD_GNU,
476 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
477 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
478 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
479 ac_cv_prog_gnu_ld=yes
485 # AM_PROG_NM - find the path to a BSD-compatible name lister
487 [AC_MSG_CHECKING([for BSD-compatible nm])
488 AC_CACHE_VAL(ac_cv_path_NM,
491 ac_cv_path_NM="$NM" # Let the user override the test with a path.
494 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
495 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
496 test -z "$ac_dir" && ac_dir=.
497 if test -f $ac_dir/nm; then
498 # Check to see if the nm accepts a BSD-compat flag.
499 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
500 # nm: unknown option "B" ignored
501 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
502 ac_cv_path_NM="$ac_dir/nm -B"
503 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
504 ac_cv_path_NM="$ac_dir/nm -p"
506 ac_cv_path_NM="$ac_dir/nm"
512 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
520 # Like AC_CONFIG_HEADER, but automatically create stamp file.
522 AC_DEFUN(AM_CONFIG_HEADER,
524 AC_CONFIG_HEADER([$1])
525 dnl When config.status generates a header, we must update the stamp-h file.
526 dnl This file resides in the same directory as the config header
527 dnl that is generated. We must strip everything past the first ":",
528 dnl and everything past the last "/".
529 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
530 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
531 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
533 for am_file in <<$1>>; do
534 case " <<$>>CONFIG_HEADERS " in
535 *" <<$>>am_file "*<<)>>
536 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
539 am_indx=`expr "<<$>>am_indx" + 1`