Code update for Window Maker version 0.50.0
[wmaker-crm.git] / aclocal.m4
blob103a87158c6d4b3bb6293514ea4badfe28886291
1 dnl aclocal.m4 generated automatically by aclocal 1.3
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in 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.
13 # Do all the work for Automake.  This macro actually does too much --
14 # some checks are only needed if your package does certain things.
15 # But this isn't really a big deal.
17 # serial 1
19 dnl Usage:
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22 AC_DEFUN(AM_INIT_AUTOMAKE,
23 [AC_REQUIRE([AM_PROG_INSTALL])
24 PACKAGE=[$1]
25 AC_SUBST(PACKAGE)
26 VERSION=[$2]
27 AC_SUBST(VERSION)
28 dnl test to see if srcdir already configured
29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
32 ifelse([$3],,
33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
35 AC_REQUIRE([AM_SANITY_CHECK])
36 AC_REQUIRE([AC_ARG_PROGRAM])
37 dnl FIXME This is truly gross.
38 missing_dir=`cd $ac_aux_dir && pwd`
39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44 AC_REQUIRE([AC_PROG_MAKE_SET])])
47 # serial 1
49 AC_DEFUN(AM_PROG_INSTALL,
50 [AC_REQUIRE([AC_PROG_INSTALL])
51 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
52 AC_SUBST(INSTALL_SCRIPT)dnl
56 # Check to make sure that the build environment is sane.
59 AC_DEFUN(AM_SANITY_CHECK,
60 [AC_MSG_CHECKING([whether build environment is sane])
61 # Just in case
62 sleep 1
63 echo timestamp > conftestfile
64 # Do `set' in a subshell so we don't clobber the current shell's
65 # arguments.  Must try -L first in case configure is actually a
66 # symlink; some systems play weird games with the mod time of symlinks
67 # (eg FreeBSD returns the mod time of the symlink's containing
68 # directory).
69 if (
70    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
71    if test "[$]*" = "X"; then
72       # -L didn't work.
73       set X `ls -t $srcdir/configure conftestfile`
74    fi
75    if test "[$]*" != "X $srcdir/configure conftestfile" \
76       && test "[$]*" != "X conftestfile $srcdir/configure"; then
78       # If neither matched, then we have a broken ls.  This can happen
79       # if, for instance, CONFIG_SHELL is bash and it inherits a
80       # broken ls alias from the environment.  This has actually
81       # happened.  Such a system could not be considered "sane".
82       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
83 alias in your environment])
84    fi
86    test "[$]2" = conftestfile
87    )
88 then
89    # Ok.
90    :
91 else
92    AC_MSG_ERROR([newly created file is older than distributed files!
93 Check your system clock])
95 rm -f conftest*
96 AC_MSG_RESULT(yes)])
98 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
99 dnl The program must properly implement --version.
100 AC_DEFUN(AM_MISSING_PROG,
101 [AC_MSG_CHECKING(for working $2)
102 # Run test in a subshell; some versions of sh will print an error if
103 # an executable is not found, even if stderr is redirected.
104 # Redirect stdin to placate older versions of autoconf.  Sigh.
105 if ($2 --version) < /dev/null > /dev/null 2>&1; then
106    $1=$2
107    AC_MSG_RESULT(found)
108 else
109    $1="$3/missing $2"
110    AC_MSG_RESULT(missing)
112 AC_SUBST($1)])
115 # serial 9 AM_PROG_LIBTOOL
116 AC_DEFUN(AM_PROG_LIBTOOL,
117 [AC_REQUIRE([AC_CANONICAL_HOST])
118 AC_REQUIRE([AC_PROG_CC])
119 AC_REQUIRE([AC_PROG_RANLIB])
120 AC_REQUIRE([AM_PROG_LD])
121 AC_REQUIRE([AC_PROG_LN_S])
123 # Always use our own libtool.
124 LIBTOOL='$(top_builddir)/libtool'
125 AC_SUBST(LIBTOOL)
127 dnl Allow the --disable-shared flag to stop us from building shared libs.
128 AC_ARG_ENABLE(shared,
129 [  --enable-shared         build shared libraries [default=yes]],
130 test "$enableval" = no && libtool_shared=" --disable-shared",
131 libtool_shared=)
133 dnl Allow the --disable-static flag to stop us from building static libs.
134 AC_ARG_ENABLE(static,
135 [  --enable-static         build static libraries [default=yes]],
136 test "$enableval" = no && libtool_static=" --disable-static",
137 libtool_static=)
139 libtool_flags="$libtool_shared$libtool_static"
140 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
141 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
142 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
144 # Some flags need to be propagated to the compiler or linker for good
145 # libtool support.
146 [case "$host" in
147 *-*-irix6*)
148   for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
149     if echo " $CC $CFLAGS " | egrep -e "[       ]$f[     ]" > /dev/null; then
150       LD="${LD-ld} $f"
151     fi
152   done
153   ;;
155 *-*-sco3.2v5*)
156   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
157   CFLAGS="$CFLAGS -belf"
158   ;;
159 esac]
161 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
162 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
163 LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
164 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
165 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
166 || AC_MSG_ERROR([libtool configure failed])
169 # AM_PROG_LD - find the path to the GNU or non-GNU linker
170 AC_DEFUN(AM_PROG_LD,
171 [AC_ARG_WITH(gnu-ld,
172 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
173 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
174 if test "$with_gnu_ld" = yes; then
175   AC_MSG_CHECKING([for GNU ld])
176 else
177   AC_MSG_CHECKING([for non-GNU ld])
179 AC_CACHE_VAL(ac_cv_path_LD,
180 [case "$LD" in
181   /*)
182   ac_cv_path_LD="$LD" # Let the user override the test with a path.
183   ;;
184   *)
185   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
186   for ac_dir in $PATH; do
187     test -z "$ac_dir" && ac_dir=.
188     if test -f "$ac_dir/ld"; then
189       ac_cv_path_LD="$ac_dir/ld"
190       # Check to see if the program is GNU ld.  I'd rather use --version,
191       # but apparently some GNU ld's only accept -v.
192       # Break only if it was the GNU/non-GNU ld that we prefer.
193       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
194         test "$with_gnu_ld" = yes && break
195       else
196         test "$with_gnu_ld" != yes && break
197       fi
198     fi
199   done
200   IFS="$ac_save_ifs"
201   ;;
202 esac])
203 LD="$ac_cv_path_LD"
204 if test -n "$LD"; then
205   AC_MSG_RESULT($LD)
206 else
207   AC_MSG_RESULT(no)
209 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
210 AC_SUBST(LD)
211 AM_PROG_LD_GNU
214 AC_DEFUN(AM_PROG_LD_GNU,
215 [AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld,
216 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
217 if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
218   ac_cv_prog_gnu_ld=yes
219 else
220   ac_cv_prog_gnu_ld=no
221 fi])
224 # Like AC_CONFIG_HEADER, but automatically create stamp file.
226 AC_DEFUN(AM_CONFIG_HEADER,
227 [AC_PREREQ([2.12])
228 AC_CONFIG_HEADER([$1])
229 dnl When config.status generates a header, we must update the stamp-h file.
230 dnl This file resides in the same directory as the config header
231 dnl that is generated.  We must strip everything past the first ":",
232 dnl and everything past the last "/".
233 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
234 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
235 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
236 <<am_indx=1
237 for am_file in <<$1>>; do
238   case " <<$>>CONFIG_HEADERS " in
239   *" <<$>>am_file "*<<)>>
240     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
241     ;;
242   esac
243   am_indx=`expr "<<$>>am_indx" + 1`
244 done<<>>dnl>>)
245 changequote([,]))])