root/branches/jons-gtk-gui/jons-gtk-gui/aclocal.m4

Revision 794, 12.1 kB (checked in by graham, 9 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13# Like AC_CONFIG_HEADER, but automatically create stamp file.
14
15AC_DEFUN(AM_CONFIG_HEADER,
16[AC_PREREQ([2.12])
17AC_CONFIG_HEADER([$1])
18dnl When config.status generates a header, we must update the stamp-h file.
19dnl This file resides in the same directory as the config header
20dnl that is generated.  We must strip everything past the first ":",
21dnl and everything past the last "/".
22AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
25<<am_indx=1
26for am_file in <<$1>>; do
27  case " <<$>>CONFIG_HEADERS " in
28  *" <<$>>am_file "*<<)>>
29    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
30    ;;
31  esac
32  am_indx=`expr "<<$>>am_indx" + 1`
33done<<>>dnl>>)
34changequote([,]))])
35
36# Do all the work for Automake.  This macro actually does too much --
37# some checks are only needed if your package does certain things.
38# But this isn't really a big deal.
39
40# serial 1
41
42dnl Usage:
43dnl AM_INIT_AUTOMAKE(package,version, [no-define])
44
45AC_DEFUN(AM_INIT_AUTOMAKE,
46[AC_REQUIRE([AC_PROG_INSTALL])
47PACKAGE=[$1]
48AC_SUBST(PACKAGE)
49VERSION=[$2]
50AC_SUBST(VERSION)
51dnl test to see if srcdir already configured
52if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
53  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
54fi
55ifelse([$3],,
56AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
57AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
58AC_REQUIRE([AM_SANITY_CHECK])
59AC_REQUIRE([AC_ARG_PROGRAM])
60dnl FIXME This is truly gross.
61missing_dir=`cd $ac_aux_dir && pwd`
62AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
63AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
64AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
65AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
66AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
67AC_REQUIRE([AC_PROG_MAKE_SET])])
68
69#
70# Check to make sure that the build environment is sane.
71#
72
73AC_DEFUN(AM_SANITY_CHECK,
74[AC_MSG_CHECKING([whether build environment is sane])
75# Just in case
76sleep 1
77echo timestamp > conftestfile
78# Do `set' in a subshell so we don't clobber the current shell's
79# arguments.  Must try -L first in case configure is actually a
80# symlink; some systems play weird games with the mod time of symlinks
81# (eg FreeBSD returns the mod time of the symlink's containing
82# directory).
83if (
84   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
85   if test "[$]*" = "X"; then
86      # -L didn't work.
87      set X `ls -t $srcdir/configure conftestfile`
88   fi
89   if test "[$]*" != "X $srcdir/configure conftestfile" \
90      && test "[$]*" != "X conftestfile $srcdir/configure"; then
91
92      # If neither matched, then we have a broken ls.  This can happen
93      # if, for instance, CONFIG_SHELL is bash and it inherits a
94      # broken ls alias from the environment.  This has actually
95      # happened.  Such a system could not be considered "sane".
96      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
97alias in your environment])
98   fi
99
100   test "[$]2" = conftestfile
101   )
102then
103   # Ok.
104   :
105else
106   AC_MSG_ERROR([newly created file is older than distributed files!
107Check your system clock])
108fi
109rm -f conftest*
110AC_MSG_RESULT(yes)])
111
112dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
113dnl The program must properly implement --version.
114AC_DEFUN(AM_MISSING_PROG,
115[AC_MSG_CHECKING(for working $2)
116# Run test in a subshell; some versions of sh will print an error if
117# an executable is not found, even if stderr is redirected.
118# Redirect stdin to placate older versions of autoconf.  Sigh.
119if ($2 --version) < /dev/null > /dev/null 2>&1; then
120   $1=$2
121   AC_MSG_RESULT(found)
122else
123   $1="$3/missing $2"
124   AC_MSG_RESULT(missing)
125fi
126AC_SUBST($1)])
127
128# Add --enable-maintainer-mode option to configure.
129# From Jim Meyering
130
131# serial 1
132
133AC_DEFUN(AM_MAINTAINER_MODE,
134[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
135  dnl maintainer-mode is disabled by default
136  AC_ARG_ENABLE(maintainer-mode,
137[  --enable-maintainer-mode enable make rules and dependencies not useful
138                          (and sometimes confusing) to the casual installer],
139      USE_MAINTAINER_MODE=$enableval,
140      USE_MAINTAINER_MODE=no)
141  AC_MSG_RESULT($USE_MAINTAINER_MODE)
142  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
143  MAINT=$MAINTAINER_MODE_TRUE
144  AC_SUBST(MAINT)dnl
145]
146)
147
148# Define a conditional.
149
150AC_DEFUN(AM_CONDITIONAL,
151[AC_SUBST($1_TRUE)
152AC_SUBST($1_FALSE)
153if $2; then
154  $1_TRUE=
155  $1_FALSE='#'
156else
157  $1_TRUE='#'
158  $1_FALSE=
159fi])
160
161
162# serial 24 AM_PROG_LIBTOOL
163AC_DEFUN(AM_PROG_LIBTOOL,
164[AC_REQUIRE([AM_ENABLE_SHARED])dnl
165AC_REQUIRE([AM_ENABLE_STATIC])dnl
166AC_REQUIRE([AC_CANONICAL_HOST])dnl
167AC_REQUIRE([AC_PROG_RANLIB])dnl
168AC_REQUIRE([AC_PROG_CC])dnl
169AC_REQUIRE([AM_PROG_LD])dnl
170AC_REQUIRE([AM_PROG_NM])dnl
171AC_REQUIRE([AC_PROG_LN_S])dnl
172dnl
173# Always use our own libtool.
174LIBTOOL='$(SHELL) $(top_builddir)/libtool'
175AC_SUBST(LIBTOOL)dnl
176
177# Check for any special flags to pass to ltconfig.
178libtool_flags=
179test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
180test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
181test "$silent" = yes && libtool_flags="$libtool_flags --silent"
182test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
183test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
184
185# Some flags need to be propagated to the compiler or linker for good
186# libtool support.
187case "$host" in
188*-*-irix6*)
189  # Find out which ABI we are using.
190  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
191  if AC_TRY_EVAL(ac_compile); then
192    case "`/usr/bin/file conftest.o`" in
193    *32-bit*)
194      LD="${LD-ld} -32"
195      ;;
196    *N32*)
197      LD="${LD-ld} -n32"
198      ;;
199    *64-bit*)
200      LD="${LD-ld} -64"
201      ;;
202    esac
203  fi
204  rm -rf conftest*
205  ;;
206
207*-*-sco3.2v5*)
208  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
209  CFLAGS="$CFLAGS -belf"
210  ;;
211esac
212
213# Actually configure libtool.  ac_aux_dir is where install-sh is found.
214CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
215LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
216${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
217$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
218|| AC_MSG_ERROR([libtool configure failed])
219])
220
221# AM_ENABLE_SHARED - implement the --enable-shared flag
222# Usage: AM_ENABLE_SHARED[(DEFAULT)]
223#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
224#   `yes'.
225AC_DEFUN(AM_ENABLE_SHARED,
226[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
227AC_ARG_ENABLE(shared,
228changequote(<<, >>)dnl
229<<  --enable-shared         build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
230changequote([, ])dnl
231[  --enable-shared=PKGS    only build shared libraries if the current package
232                          appears as an element in the PKGS list],
233[p=${PACKAGE-default}
234case "$enableval" in
235yes) enable_shared=yes ;;
236no) enable_shared=no ;;
237*)
238  enable_shared=no
239  # Look at the argument we got.  We use all the common list separators.
240  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
241  for pkg in $enableval; do
242    if test "X$pkg" = "X$p"; then
243      enable_shared=yes
244    fi
245  done
246  IFS="$ac_save_ifs"
247  ;;
248esac],
249enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
250])
251
252# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
253AC_DEFUN(AM_DISABLE_SHARED,
254[AM_ENABLE_SHARED(no)])
255
256# AM_DISABLE_STATIC - set the default static flag to --disable-static
257AC_DEFUN(AM_DISABLE_STATIC,
258[AM_ENABLE_STATIC(no)])
259
260# AM_ENABLE_STATIC - implement the --enable-static flag
261# Usage: AM_ENABLE_STATIC[(DEFAULT)]
262#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
263#   `yes'.
264AC_DEFUN(AM_ENABLE_STATIC,
265[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
266AC_ARG_ENABLE(static,
267changequote(<<, >>)dnl
268<<  --enable-static         build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
269changequote([, ])dnl
270[  --enable-static=PKGS    only build shared libraries if the current package
271                          appears as an element in the PKGS list],
272[p=${PACKAGE-default}
273case "$enableval" in
274yes) enable_static=yes ;;
275no) enable_static=no ;;
276*)
277  enable_static=no
278  # Look at the argument we got.  We use all the common list separators.
279  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
280  for pkg in $enableval; do
281    if test "X$pkg" = "X$p"; then
282      enable_static=yes
283    fi
284  done
285  IFS="$ac_save_ifs"
286  ;;
287esac],
288enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
289])
290
291
292# AM_PROG_LD - find the path to the GNU or non-GNU linker
293AC_DEFUN(AM_PROG_LD,
294[AC_ARG_WITH(gnu-ld,
295[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
296test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
297AC_REQUIRE([AC_PROG_CC])
298ac_prog=ld
299if test "$ac_cv_prog_gcc" = yes; then
300  # Check if gcc -print-prog-name=ld gives a path.
301  AC_MSG_CHECKING([for ld used by GCC])
302  ac_prog=`($CC -print-prog-name=ld) 2>&5`
303  case "$ac_prog" in
304  # Accept absolute paths.
305  /* | [A-Za-z]:\\*)
306    test -z "$LD" && LD="$ac_prog"
307    ;;
308  "")
309    # If it fails, then pretend we aren't using GCC.
310    ac_prog=ld
311    ;;
312  *)
313    # If it is relative, then search for the first ld in PATH.
314    with_gnu_ld=unknown
315    ;;
316  esac
317elif test "$with_gnu_ld" = yes; then
318  AC_MSG_CHECKING([for GNU ld])
319else
320  AC_MSG_CHECKING([for non-GNU ld])
321fi
322AC_CACHE_VAL(ac_cv_path_LD,
323[if test -z "$LD"; then
324  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
325  for ac_dir in $PATH; do
326    test -z "$ac_dir" && ac_dir=.
327    if test -f "$ac_dir/$ac_prog"; then
328      ac_cv_path_LD="$ac_dir/$ac_prog"
329      # Check to see if the program is GNU ld.  I'd rather use --version,
330      # but apparently some GNU ld's only accept -v.
331      # Break only if it was the GNU/non-GNU ld that we prefer.
332      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
333    test "$with_gnu_ld" != no && break
334      else
335        test "$with_gnu_ld" != yes && break
336      fi
337    fi
338  done
339  IFS="$ac_save_ifs"
340else
341  ac_cv_path_LD="$LD" # Let the user override the test with a path.
342fi])
343LD="$ac_cv_path_LD"
344if test -n "$LD"; then
345  AC_MSG_RESULT($LD)
346else
347  AC_MSG_RESULT(no)
348fi
349test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
350AC_SUBST(LD)
351AM_PROG_LD_GNU
352])
353
354AC_DEFUN(AM_PROG_LD_GNU,
355[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
356[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
357if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
358  ac_cv_prog_gnu_ld=yes
359else
360  ac_cv_prog_gnu_ld=no
361fi])
362])
363
364# AM_PROG_NM - find the path to a BSD-compatible name lister
365AC_DEFUN(AM_PROG_NM,
366[AC_MSG_CHECKING([for BSD-compatible nm])
367AC_CACHE_VAL(ac_cv_path_NM,
368[case "$NM" in
369/* | [A-Za-z]:\\*)
370  ac_cv_path_NM="$NM" # Let the user override the test with a path.
371  ;;
372*)
373  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
374  for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
375    test -z "$ac_dir" && ac_dir=.
376    if test -f $ac_dir/nm; then
377      # Check to see if the nm accepts a BSD-compat flag.
378      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
379      #   nm: unknown option "B" ignored
380      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
381        ac_cv_path_NM="$ac_dir/nm -B"
382      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
383        ac_cv_path_NM="$ac_dir/nm -p"
384      else
385        ac_cv_path_NM="$ac_dir/nm"
386      fi
387      break
388    fi
389  done
390  IFS="$ac_save_ifs"
391  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
392  ;;
393esac])
394NM="$ac_cv_path_NM"
395AC_MSG_RESULT([$NM])
396AC_SUBST(NM)
397])
398
Note: See TracBrowser for help on using the browser.