atusb: Delete temporary file
[linux-libre-firmware.git] / as31 / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
2
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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.
7
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.
12
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.
16
17 # serial 1
18
19 dnl Usage:
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21
22 AC_DEFUN([AM_INIT_AUTOMAKE],
23 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
24 AC_REQUIRE([AC_PROG_INSTALL])
25 PACKAGE=[$1]
26 AC_SUBST(PACKAGE)
27 VERSION=[$2]
28 AC_SUBST(VERSION)
29 dnl test to see if srcdir already configured
30 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
31   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
32 fi
33 ifelse([$3],,
34 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
35 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
36 AC_REQUIRE([AM_SANITY_CHECK])
37 AC_REQUIRE([AC_ARG_PROGRAM])
38 dnl FIXME This is truly gross.
39 missing_dir=`cd $ac_aux_dir && pwd`
40 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
41 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
42 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
43 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
44 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
45 AC_REQUIRE([AC_PROG_MAKE_SET])])
46
47 # Copyright 2002  Free Software Foundation, Inc.
48
49 # This program is free software; you can redistribute it and/or modify
50 # it under the terms of the GNU General Public License as published by
51 # the Free Software Foundation; either version 2, or (at your option)
52 # any later version.
53
54 # This program is distributed in the hope that it will be useful,
55 # but WITHOUT ANY WARRANTY; without even the implied warranty of
56 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57 # GNU General Public License for more details.
58
59 # You should have received a copy of the GNU General Public License
60 # along with this program; if not, write to the Free Software
61 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
62
63 # AM_AUTOMAKE_VERSION(VERSION)
64 # ----------------------------
65 # Automake X.Y traces this macro to ensure aclocal.m4 has been
66 # generated from the m4 files accompanying Automake X.Y.
67 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
68
69 # AM_SET_CURRENT_AUTOMAKE_VERSION
70 # -------------------------------
71 # Call AM_AUTOMAKE_VERSION so it can be traced.
72 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
73 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
74          [AM_AUTOMAKE_VERSION([1.4-p6])])
75
76 #
77 # Check to make sure that the build environment is sane.
78 #
79
80 AC_DEFUN([AM_SANITY_CHECK],
81 [AC_MSG_CHECKING([whether build environment is sane])
82 # Just in case
83 sleep 1
84 echo timestamp > conftestfile
85 # Do `set' in a subshell so we don't clobber the current shell's
86 # arguments.  Must try -L first in case configure is actually a
87 # symlink; some systems play weird games with the mod time of symlinks
88 # (eg FreeBSD returns the mod time of the symlink's containing
89 # directory).
90 if (
91    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
92    if test "[$]*" = "X"; then
93       # -L didn't work.
94       set X `ls -t $srcdir/configure conftestfile`
95    fi
96    if test "[$]*" != "X $srcdir/configure conftestfile" \
97       && test "[$]*" != "X conftestfile $srcdir/configure"; then
98
99       # If neither matched, then we have a broken ls.  This can happen
100       # if, for instance, CONFIG_SHELL is bash and it inherits a
101       # broken ls alias from the environment.  This has actually
102       # happened.  Such a system could not be considered "sane".
103       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
104 alias in your environment])
105    fi
106
107    test "[$]2" = conftestfile
108    )
109 then
110    # Ok.
111    :
112 else
113    AC_MSG_ERROR([newly created file is older than distributed files!
114 Check your system clock])
115 fi
116 rm -f conftest*
117 AC_MSG_RESULT(yes)])
118
119 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
120 dnl The program must properly implement --version.
121 AC_DEFUN([AM_MISSING_PROG],
122 [AC_MSG_CHECKING(for working $2)
123 # Run test in a subshell; some versions of sh will print an error if
124 # an executable is not found, even if stderr is redirected.
125 # Redirect stdin to placate older versions of autoconf.  Sigh.
126 if ($2 --version) < /dev/null > /dev/null 2>&1; then
127    $1=$2
128    AC_MSG_RESULT(found)
129 else
130    $1="$3/missing $2"
131    AC_MSG_RESULT(missing)
132 fi
133 AC_SUBST($1)])
134
135 # Configure paths for GTK+
136 # Owen Taylor     97-11-3
137
138 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
139 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
140 dnl
141 AC_DEFUN(AM_PATH_GTK,
142 [dnl 
143 dnl Get the cflags and libraries from the gtk-config script
144 dnl
145 AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
146             gtk_config_prefix="$withval", gtk_config_prefix="")
147 AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
148             gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
149 AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
150                     , enable_gtktest=yes)
151
152   for module in . $4
153   do
154       case "$module" in
155          gthread) 
156              gtk_config_args="$gtk_config_args gthread"
157          ;;
158       esac
159   done
160
161   if test x$gtk_config_exec_prefix != x ; then
162      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
163      if test x${GTK_CONFIG+set} != xset ; then
164         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
165      fi
166   fi
167   if test x$gtk_config_prefix != x ; then
168      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
169      if test x${GTK_CONFIG+set} != xset ; then
170         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
171      fi
172   fi
173
174   AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
175   min_gtk_version=ifelse([$1], ,0.99.7,$1)
176   AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
177   no_gtk=""
178   if test "$GTK_CONFIG" = "no" ; then
179     no_gtk=yes
180   else
181     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
182     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
183     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
184            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
185     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
186            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
187     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
188            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
189     if test "x$enable_gtktest" = "xyes" ; then
190       ac_save_CFLAGS="$CFLAGS"
191       ac_save_LIBS="$LIBS"
192       CFLAGS="$CFLAGS $GTK_CFLAGS"
193       LIBS="$GTK_LIBS $LIBS"
194 dnl
195 dnl Now check if the installed GTK is sufficiently new. (Also sanity
196 dnl checks the results of gtk-config to some extent
197 dnl
198       rm -f conf.gtktest
199       AC_TRY_RUN([
200 #include <gtk/gtk.h>
201 #include <stdio.h>
202 #include <stdlib.h>
203
204 int 
205 main ()
206 {
207   int major, minor, micro;
208   char *tmp_version;
209
210   system ("touch conf.gtktest");
211
212   /* HP/UX 9 (%@#!) writes to sscanf strings */
213   tmp_version = g_strdup("$min_gtk_version");
214   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
215      printf("%s, bad version string\n", "$min_gtk_version");
216      exit(1);
217    }
218
219   if ((gtk_major_version != $gtk_config_major_version) ||
220       (gtk_minor_version != $gtk_config_minor_version) ||
221       (gtk_micro_version != $gtk_config_micro_version))
222     {
223       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
224              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
225              gtk_major_version, gtk_minor_version, gtk_micro_version);
226       printf ("*** was found! If gtk-config was correct, then it is best\n");
227       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
228       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
229       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
230       printf("*** required on your system.\n");
231       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
232       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
233       printf("*** before re-running configure\n");
234     } 
235 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
236   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
237            (gtk_minor_version != GTK_MINOR_VERSION) ||
238            (gtk_micro_version != GTK_MICRO_VERSION))
239     {
240       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
241              GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
242       printf("*** library (version %d.%d.%d)\n",
243              gtk_major_version, gtk_minor_version, gtk_micro_version);
244     }
245 #endif /* defined (GTK_MAJOR_VERSION) ... */
246   else
247     {
248       if ((gtk_major_version > major) ||
249         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
250         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
251       {
252         return 0;
253        }
254      else
255       {
256         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
257                gtk_major_version, gtk_minor_version, gtk_micro_version);
258         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
259                major, minor, micro);
260         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
261         printf("***\n");
262         printf("*** If you have already installed a sufficiently new version, this error\n");
263         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
264         printf("*** being found. The easiest way to fix this is to remove the old version\n");
265         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
266         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
267         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
268         printf("*** so that the correct libraries are found at run-time))\n");
269       }
270     }
271   return 1;
272 }
273 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
274        CFLAGS="$ac_save_CFLAGS"
275        LIBS="$ac_save_LIBS"
276      fi
277   fi
278   if test "x$no_gtk" = x ; then
279      AC_MSG_RESULT(yes)
280      ifelse([$2], , :, [$2])     
281   else
282      AC_MSG_RESULT(no)
283      if test "$GTK_CONFIG" = "no" ; then
284        echo "*** The gtk-config script installed by GTK could not be found"
285        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
286        echo "*** your path, or set the GTK_CONFIG environment variable to the"
287        echo "*** full path to gtk-config."
288      else
289        if test -f conf.gtktest ; then
290         :
291        else
292           echo "*** Could not run GTK test program, checking why..."
293           CFLAGS="$CFLAGS $GTK_CFLAGS"
294           LIBS="$LIBS $GTK_LIBS"
295           AC_TRY_LINK([
296 #include <gtk/gtk.h>
297 #include <stdio.h>
298 ],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
299         [ echo "*** The test program compiled, but did not run. This usually means"
300           echo "*** that the run-time linker is not finding GTK or finding the wrong"
301           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
302           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
303           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
304           echo "*** is required on your system"
305           echo "***"
306           echo "*** If you have an old version installed, it is best to remove it, although"
307           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
308           echo "***"
309           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
310           echo "*** came with the system with the command"
311           echo "***"
312           echo "***    rpm --erase --nodeps gtk gtk-devel" ],
313         [ echo "*** The test program failed to compile or link. See the file config.log for the"
314           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
315           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
316           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
317           CFLAGS="$ac_save_CFLAGS"
318           LIBS="$ac_save_LIBS"
319        fi
320      fi
321      GTK_CFLAGS=""
322      GTK_LIBS=""
323      ifelse([$3], , :, [$3])
324   fi
325   AC_SUBST(GTK_CFLAGS)
326   AC_SUBST(GTK_LIBS)
327   rm -f conf.gtktest
328 ])
329
330 # Define a conditional.
331
332 AC_DEFUN([AM_CONDITIONAL],
333 [AC_SUBST($1_TRUE)
334 AC_SUBST($1_FALSE)
335 if $2; then
336   $1_TRUE=
337   $1_FALSE='#'
338 else
339   $1_TRUE='#'
340   $1_FALSE=
341 fi])
342