~logan/ubuntu/trusty/pinentry/0.8.3-1ubuntu1

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2005-01-27 19:10:07 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050127191007-83ptn4mcw63mu085
Tags: 0.7.2-1
* New upstream release
* Added new -gtk2 flavor.
* Build dependencies revised accordingly.
* Added more copyright holders to debian/copyright.
* Removed compatibility symlinks.
* Converted to CDBS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4
4
# Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
dnl Autoconf macros used by PINENTRY
15
 
dnl
16
 
dnl Copyright (C) 2002 g10 Code GmbH
17
 
dnl
18
 
dnl IU_LIB_NCURSES, IU_LIB_CURSES and IU_LIB_TERMCAP are:
19
 
dnl Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
20
 
dnl Written by Miles Bader <miles@gnu.ai.mit.edu>
21
 
dnl
22
 
dnl This program is free software; you can redistribute it and/or modify
23
 
dnl it under the terms of the GNU General Public License as published by
24
 
dnl the Free Software Foundation; either version 2, or (at your option)
25
 
dnl any later version.
26
 
dnl
27
 
dnl This program is distributed in the hope that it will be useful,
28
 
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
29
 
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
 
dnl GNU General Public License for more details.
31
 
dnl
32
 
dnl You should have received a copy of the GNU General Public License
33
 
dnl along with this program; if not, write to the Free Software
34
 
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35
 
dnl
36
 
 
37
 
dnl IU_LIB_NCURSES -- check for, and configure, ncurses
38
 
dnl
39
 
dnl If libncurses is found to exist on this system and the --disable-ncurses
40
 
dnl flag wasn't specified, defines LIBNCURSES with the appropriate linker
41
 
dnl specification, and possibly defines NCURSES_INCLUDE with the appropriate
42
 
dnl -I flag to get access to ncurses include files.
43
 
dnl
44
 
AC_DEFUN([IU_LIB_NCURSES], [
45
 
  AC_ARG_ENABLE(ncurses,    [  --disable-ncurses       don't prefer -lncurses over -lcurses],
46
 
              , enable_ncurses=yes)
47
 
  if test "$enable_ncurses" = yes; then
48
 
    AC_CHECK_LIB(ncurses, initscr, LIBNCURSES="-lncurses")
49
 
    if test "$LIBNCURSES"; then
50
 
      # Use ncurses header files instead of the ordinary ones, if possible;
51
 
      # is there a better way of doing this, that avoids looking in specific
52
 
      # directories?
53
 
      AC_ARG_WITH(ncurses-include-dir,
54
 
[  --with-ncurses-include-dir=DIR
55
 
                          Set directory containing the include files for
56
 
                          use with -lncurses, when it isn't installed as
57
 
                          the default curses library.  If DIR is "none",
58
 
                          then no special ncurses include files are used.
59
 
  --without-ncurses-include-dir
60
 
                          Equivalent to --with-ncurses-include-dir=none])dnl
61
 
      if test "${with_ncurses_include_dir+set}" = set; then
62
 
        AC_MSG_CHECKING(for ncurses include dir)
63
 
        case "$with_ncurses_include_dir" in
64
 
          no|none)
65
 
            inetutils_cv_includedir_ncurses=none;;
66
 
          *)
67
 
            inetutils_cv_includedir_ncurses="$with_ncurses_include_dir";;
68
 
        esac
69
 
        AC_MSG_RESULT($inetutils_cv_includedir_ncurses)
70
 
      else
71
 
        AC_CACHE_CHECK(for ncurses include dir,
72
 
                       inetutils_cv_includedir_ncurses,
73
 
          for D in $includedir $prefix/include /local/include /usr/local/include /include /usr/include; do
74
 
            if test -d $D/ncurses; then
75
 
              inetutils_cv_includedir_ncurses="$D/ncurses"
76
 
              break
77
 
            fi
78
 
            test "$inetutils_cv_includedir_ncurses" \
79
 
              || inetutils_cv_includedir_ncurses=none
80
 
          done)
81
 
      fi
82
 
      if test "$inetutils_cv_includedir_ncurses" = none; then
83
 
        NCURSES_INCLUDE=""
84
 
      else
85
 
        NCURSES_INCLUDE="-I$inetutils_cv_includedir_ncurses"
86
 
      fi
87
 
    fi
88
 
  fi
89
 
  AC_SUBST(NCURSES_INCLUDE)
90
 
  AC_SUBST(LIBNCURSES)])dnl
91
 
 
92
 
dnl IU_LIB_TERMCAP -- check for various termcap libraries
93
 
dnl
94
 
dnl Checks for various common libraries implementing the termcap interface,
95
 
dnl including ncurses (unless --disable ncurses is specified), curses (which
96
 
dnl does on some systems), termcap, and termlib.  If termcap is found, then
97
 
dnl LIBTERMCAP is defined with the appropriate linker specification.
98
 
dnl 
99
 
AC_DEFUN([IU_LIB_TERMCAP], [
100
 
  AC_REQUIRE([IU_LIB_NCURSES])
101
 
  if test "$LIBNCURSES"; then
102
 
    LIBTERMCAP="$LIBNCURSES"
103
 
  else
104
 
    AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses)
105
 
    if test "$ac_cv_lib_curses_tgetent" = no; then
106
 
      AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap)
107
 
    fi
108
 
    if test "$ac_cv_lib_termcap_tgetent" = no; then
109
 
      AC_CHECK_LIB(termlib, tgetent, LIBTERMCAP=-ltermlib)
110
 
    fi
111
 
  fi
112
 
  AC_SUBST(LIBTERMCAP)])dnl
113
 
 
114
 
dnl IU_LIB_CURSES -- checke for curses, and associated libraries
115
 
dnl
116
 
dnl Checks for varions libraries implementing the curses interface, and if
117
 
dnl found, defines LIBCURSES to be the appropriate linker specification,
118
 
dnl *including* any termcap libraries if needed (some versions of curses
119
 
dnl don't need termcap).
120
 
dnl
121
 
AC_DEFUN([IU_LIB_CURSES], [
122
 
  AC_REQUIRE([IU_LIB_TERMCAP])
123
 
  AC_REQUIRE([IU_LIB_NCURSES])
124
 
  if test "$LIBNCURSES"; then
125
 
    LIBCURSES="$LIBNCURSES"     # ncurses doesn't require termcap
126
 
  else
127
 
    _IU_SAVE_LIBS="$LIBS"
128
 
    LIBS="$LIBTERMCAP"
129
 
    AC_CHECK_LIB(curses, initscr, LIBCURSES="-lcurses")
130
 
    if test "$LIBCURSES" -a "$LIBTERMCAP" -a "$LIBCURSES" != "$LIBTERMCAP"; then
131
 
      AC_CACHE_CHECK(whether curses needs $LIBTERMCAP,
132
 
                     inetutils_cv_curses_needs_termcap,
133
 
        LIBS="$LIBCURSES"
134
 
        AC_TRY_LINK([#include <curses.h>], [initscr ();],
135
 
                    [inetutils_cv_curses_needs_termcap=no],
136
 
                    [inetutils_cv_curses_needs_termcap=yes]))
137
 
      if test $inetutils_cv_curses_needs_termcap = yes; then
138
 
          LIBCURSES="$LIBCURSES $LIBTERMCAP"
139
 
      fi
140
 
    fi
141
 
    LIBS="$_IU_SAVE_LIBS"
142
 
  fi
143
 
  AC_SUBST(LIBCURSES)])dnl
144
 
dnl additional configure macros
145
 
 
146
 
#
147
 
# From /usr/share/aclocal/iconv.m4.
148
 
#
149
 
#serial AM2
150
 
 
151
 
dnl From Bruno Haible.
152
 
 
153
 
AC_DEFUN([AM_ICONV],
154
 
[
155
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
156
 
  dnl those with the standalone portable GNU libiconv installed).
157
 
 
158
 
  AC_ARG_WITH([libiconv-prefix],
159
 
[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
160
 
    for dir in `echo "$withval" | tr : ' '`; do
161
 
      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
162
 
      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
163
 
    done
164
 
   ])
165
 
 
166
 
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
167
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
168
 
    am_cv_lib_iconv=no
169
 
    AC_TRY_LINK([#include <stdlib.h>
170
 
#include <iconv.h>],
171
 
      [iconv_t cd = iconv_open("","");
172
 
       iconv(cd,NULL,NULL,NULL,NULL);
173
 
       iconv_close(cd);],
174
 
      am_cv_func_iconv=yes)
175
 
    if test "$am_cv_func_iconv" != yes; then
176
 
      am_save_LIBS="$LIBS"
177
 
      LIBS="$LIBS -liconv"
178
 
      AC_TRY_LINK([#include <stdlib.h>
179
 
#include <iconv.h>],
180
 
        [iconv_t cd = iconv_open("","");
181
 
         iconv(cd,NULL,NULL,NULL,NULL);
182
 
         iconv_close(cd);],
183
 
        am_cv_lib_iconv=yes
184
 
        am_cv_func_iconv=yes)
185
 
      LIBS="$am_save_LIBS"
186
 
    fi
187
 
  ])
188
 
  if test "$am_cv_func_iconv" = yes; then
189
 
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
190
 
    AC_MSG_CHECKING([for iconv declaration])
191
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
192
 
      AC_TRY_COMPILE([
193
 
#include <stdlib.h>
194
 
#include <iconv.h>
195
 
extern
196
 
#ifdef __cplusplus
197
 
"C"
198
 
#endif
199
 
#if defined(__STDC__) || defined(__cplusplus)
200
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
201
 
#else
202
 
size_t iconv();
203
 
#endif
204
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
205
 
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
206
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
207
 
    AC_MSG_RESULT([$]{ac_t:-
208
 
         }[$]am_cv_proto_iconv)
209
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
210
 
      [Define as const if the declaration of iconv() needs const.])
211
 
  fi
212
 
  LIBICONV=
213
 
  if test "$am_cv_lib_iconv" = yes; then
214
 
    LIBICONV="-liconv"
215
 
  fi
216
 
  AC_SUBST(LIBICONV)
217
 
])
218
 
 
219
 
 
220
 
dnl
221
 
dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME)
222
 
dnl Check whether a typedef exists and create a #define $2 if it exists
223
 
dnl
224
 
AC_DEFUN(GNUPG_CHECK_TYPEDEF,
225
 
  [ AC_MSG_CHECKING(for $1 typedef)
226
 
    AC_CACHE_VAL(gnupg_cv_typedef_$1,
227
 
    [AC_TRY_COMPILE([#define _GNU_SOURCE 1
228
 
    #include <stdlib.h>
229
 
    #include <sys/types.h>], [
230
 
    #undef $1
231
 
    int a = sizeof($1);
232
 
    ], gnupg_cv_typedef_$1=yes, gnupg_cv_typedef_$1=no )])
233
 
    AC_MSG_RESULT($gnupg_cv_typedef_$1)
234
 
    if test "$gnupg_cv_typedef_$1" = yes; then
235
 
        AC_DEFINE($2,1,[Defined if a `]$1[' is typedef'd])
236
 
    fi
237
 
  ])
238
 
 
239
 
 
240
 
# Check whether mlock is broken (hpux 10.20 raises a SIGBUS if mlock
241
 
# is not called from uid 0 (not tested whether uid 0 works)
242
 
# For DECs Tru64 we have also to check whether mlock is in librt
243
 
# mlock is there a macro using memlk()
244
 
dnl GNUPG_CHECK_MLOCK
245
 
dnl
246
 
define(GNUPG_CHECK_MLOCK,
247
 
  [ AC_CHECK_FUNCS(mlock)
248
 
    if test "$ac_cv_func_mlock" = "no"; then
249
 
        AC_CHECK_HEADERS(sys/mman.h)
250
 
        if test "$ac_cv_header_sys_mman_h" = "yes"; then
251
 
            # Add librt to LIBS:
252
 
            AC_CHECK_LIB(rt, memlk)
253
 
            AC_CACHE_CHECK([whether mlock is in sys/mman.h],
254
 
                            gnupg_cv_mlock_is_in_sys_mman,
255
 
                [AC_TRY_LINK([
256
 
                    #include <assert.h>
257
 
                    #ifdef HAVE_SYS_MMAN_H
258
 
                    #include <sys/mman.h>
259
 
                    #endif
260
 
                ], [
261
 
                    int i;
262
 
 
263
 
                    /* glibc defines this for functions which it implements
264
 
                     * to always fail with ENOSYS.  Some functions are actually
265
 
                     * named something starting with __ and the normal name
266
 
                     * is an alias.  */
267
 
                    #if defined (__stub_mlock) || defined (__stub___mlock)
268
 
                    choke me
269
 
                    #else
270
 
                    mlock(&i, 4);
271
 
                    #endif
272
 
                    ; return 0;
273
 
                ],
274
 
                gnupg_cv_mlock_is_in_sys_mman=yes,
275
 
                gnupg_cv_mlock_is_in_sys_mman=no)])
276
 
            if test "$gnupg_cv_mlock_is_in_sys_mman" = "yes"; then
277
 
                AC_DEFINE(HAVE_MLOCK,1,
278
 
                          [Defined if the system supports an mlock() call])
279
 
            fi
280
 
        fi
281
 
    fi
282
 
    if test "$ac_cv_func_mlock" = "yes"; then
283
 
        AC_MSG_CHECKING(whether mlock is broken)
284
 
          AC_CACHE_VAL(gnupg_cv_have_broken_mlock,
285
 
             AC_TRY_RUN([
286
 
                #include <stdlib.h>
287
 
                #include <unistd.h>
288
 
                #include <errno.h>
289
 
                #include <sys/mman.h>
290
 
                #include <sys/types.h>
291
 
                #include <fcntl.h>
292
 
 
293
 
                int main()
294
 
                {
295
 
                    char *pool;
296
 
                    int err;
297
 
                    long int pgsize = getpagesize();
298
 
 
299
 
                    pool = malloc( 4096 + pgsize );
300
 
                    if( !pool )
301
 
                        return 2;
302
 
                    pool += (pgsize - ((long int)pool % pgsize));
303
 
 
304
 
                    err = mlock( pool, 4096 );
305
 
                    if( !err || errno == EPERM )
306
 
                        return 0; /* okay */
307
 
 
308
 
                    return 1;  /* hmmm */
309
 
                }
310
 
 
311
 
            ],
312
 
            gnupg_cv_have_broken_mlock="no",
313
 
            gnupg_cv_have_broken_mlock="yes",
314
 
            gnupg_cv_have_broken_mlock="assume-no"
315
 
           )
316
 
         )
317
 
         if test "$gnupg_cv_have_broken_mlock" = "yes"; then
318
 
             AC_DEFINE(HAVE_BROKEN_MLOCK,1,
319
 
                       [Defined if the mlock() call does not work])
320
 
             AC_MSG_RESULT(yes)
321
 
             AC_CHECK_FUNCS(plock)
322
 
         else
323
 
            if test "$gnupg_cv_have_broken_mlock" = "no"; then
324
 
                AC_MSG_RESULT(no)
325
 
            else
326
 
                AC_MSG_RESULT(assuming no)
327
 
            fi
328
 
         fi
329
 
    fi
330
 
  ])
331
 
 
332
 
# Configure paths for GLIB
333
 
# Owen Taylor     97-11-3
334
 
 
335
 
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
336
 
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
337
 
dnl gthread is specified in MODULES, pass to glib-config
338
 
dnl
339
 
AC_DEFUN(AM_PATH_GLIB,
340
 
[dnl 
341
 
dnl Get the cflags and libraries from the glib-config script
342
 
dnl
343
 
AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
344
 
            glib_config_prefix="$withval", glib_config_prefix="")
345
 
AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
346
 
            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
347
 
AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
348
 
                    , enable_glibtest=yes)
349
 
 
350
 
  if test x$glib_config_exec_prefix != x ; then
351
 
     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
352
 
     if test x${GLIB_CONFIG+set} != xset ; then
353
 
        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
354
 
     fi
355
 
  fi
356
 
  if test x$glib_config_prefix != x ; then
357
 
     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
358
 
     if test x${GLIB_CONFIG+set} != xset ; then
359
 
        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
360
 
     fi
361
 
  fi
362
 
 
363
 
  for module in . $4
364
 
  do
365
 
      case "$module" in
366
 
         gmodule) 
367
 
             glib_config_args="$glib_config_args gmodule"
368
 
         ;;
369
 
         gthread) 
370
 
             glib_config_args="$glib_config_args gthread"
371
 
         ;;
372
 
      esac
373
 
  done
374
 
 
375
 
  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
376
 
  min_glib_version=ifelse([$1], ,0.99.7,$1)
377
 
  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
378
 
  no_glib=""
379
 
  if test "$GLIB_CONFIG" = "no" ; then
380
 
    no_glib=yes
381
 
  else
382
 
    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
383
 
    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
384
 
    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
385
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
386
 
    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
387
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
388
 
    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
389
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
390
 
    if test "x$enable_glibtest" = "xyes" ; then
391
 
      ac_save_CFLAGS="$CFLAGS"
392
 
      ac_save_LIBS="$LIBS"
393
 
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
394
 
      LIBS="$GLIB_LIBS $LIBS"
395
 
dnl
396
 
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
397
 
dnl checks the results of glib-config to some extent
398
 
dnl
399
 
      rm -f conf.glibtest
400
 
      AC_TRY_RUN([
401
 
#include <glib.h>
402
 
#include <stdio.h>
403
 
#include <stdlib.h>
404
 
 
405
 
int 
406
 
main ()
407
 
{
408
 
  int major, minor, micro;
409
 
  char *tmp_version;
410
 
 
411
 
  system ("touch conf.glibtest");
412
 
 
413
 
  /* HP/UX 9 (%@#!) writes to sscanf strings */
414
 
  tmp_version = g_strdup("$min_glib_version");
415
 
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
416
 
     printf("%s, bad version string\n", "$min_glib_version");
417
 
     exit(1);
418
 
   }
419
 
 
420
 
  if ((glib_major_version != $glib_config_major_version) ||
421
 
      (glib_minor_version != $glib_config_minor_version) ||
422
 
      (glib_micro_version != $glib_config_micro_version))
423
 
    {
424
 
      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
425
 
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
426
 
             glib_major_version, glib_minor_version, glib_micro_version);
427
 
      printf ("*** was found! If glib-config was correct, then it is best\n");
428
 
      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
429
 
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
430
 
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
431
 
      printf("*** required on your system.\n");
432
 
      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
433
 
      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
434
 
      printf("*** before re-running configure\n");
435
 
    } 
436
 
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
437
 
           (glib_minor_version != GLIB_MINOR_VERSION) ||
438
 
           (glib_micro_version != GLIB_MICRO_VERSION))
439
 
    {
440
 
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
441
 
             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
442
 
      printf("*** library (version %d.%d.%d)\n",
443
 
             glib_major_version, glib_minor_version, glib_micro_version);
444
 
    }
445
 
  else
446
 
    {
447
 
      if ((glib_major_version > major) ||
448
 
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
449
 
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
450
 
      {
451
 
        return 0;
452
 
       }
453
 
     else
454
 
      {
455
 
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
456
 
               glib_major_version, glib_minor_version, glib_micro_version);
457
 
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
458
 
               major, minor, micro);
459
 
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
460
 
        printf("***\n");
461
 
        printf("*** If you have already installed a sufficiently new version, this error\n");
462
 
        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
463
 
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
464
 
        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
465
 
        printf("*** correct copy of glib-config. (In this case, you will have to\n");
466
 
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
467
 
        printf("*** so that the correct libraries are found at run-time))\n");
468
 
      }
469
 
    }
470
 
  return 1;
471
 
}
472
 
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
473
 
       CFLAGS="$ac_save_CFLAGS"
474
 
       LIBS="$ac_save_LIBS"
475
 
     fi
476
 
  fi
477
 
  if test "x$no_glib" = x ; then
478
 
     AC_MSG_RESULT(yes)
479
 
     ifelse([$2], , :, [$2])     
480
 
  else
481
 
     AC_MSG_RESULT(no)
482
 
     if test "$GLIB_CONFIG" = "no" ; then
483
 
       echo "*** The glib-config script installed by GLIB could not be found"
484
 
       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
485
 
       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
486
 
       echo "*** full path to glib-config."
487
 
     else
488
 
       if test -f conf.glibtest ; then
489
 
        :
490
 
       else
491
 
          echo "*** Could not run GLIB test program, checking why..."
492
 
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
493
 
          LIBS="$LIBS $GLIB_LIBS"
494
 
          AC_TRY_LINK([
495
 
#include <glib.h>
496
 
#include <stdio.h>
497
 
],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
498
 
        [ echo "*** The test program compiled, but did not run. This usually means"
499
 
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
500
 
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
501
 
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
502
 
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
503
 
          echo "*** is required on your system"
504
 
          echo "***"
505
 
          echo "*** If you have an old version installed, it is best to remove it, although"
506
 
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
507
 
          echo "***"
508
 
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
509
 
          echo "*** came with the system with the command"
510
 
          echo "***"
511
 
          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
512
 
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
513
 
          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
514
 
          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
515
 
          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
516
 
          CFLAGS="$ac_save_CFLAGS"
517
 
          LIBS="$ac_save_LIBS"
518
 
       fi
519
 
     fi
520
 
     GLIB_CFLAGS=""
521
 
     GLIB_LIBS=""
522
 
     ifelse([$3], , :, [$3])
523
 
  fi
524
 
  AC_SUBST(GLIB_CFLAGS)
525
 
  AC_SUBST(GLIB_LIBS)
526
 
  rm -f conf.glibtest
527
 
])
528
 
 
529
 
 
530
 
# Configure paths for GTK+
531
 
# Owen Taylor     97-11-3
532
 
 
533
 
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
534
 
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
535
 
dnl
536
 
AC_DEFUN(AM_PATH_GTK,
537
 
[dnl 
538
 
dnl Get the cflags and libraries from the gtk-config script
539
 
dnl
540
 
AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
541
 
            gtk_config_prefix="$withval", gtk_config_prefix="")
542
 
AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
543
 
            gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
544
 
AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
545
 
                    , enable_gtktest=yes)
546
 
 
547
 
  for module in . $4
548
 
  do
549
 
      case "$module" in
550
 
         gthread) 
551
 
             gtk_config_args="$gtk_config_args gthread"
552
 
         ;;
553
 
      esac
554
 
  done
555
 
 
556
 
  if test x$gtk_config_exec_prefix != x ; then
557
 
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
558
 
     if test x${GTK_CONFIG+set} != xset ; then
559
 
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
560
 
     fi
561
 
  fi
562
 
  if test x$gtk_config_prefix != x ; then
563
 
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
564
 
     if test x${GTK_CONFIG+set} != xset ; then
565
 
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
566
 
     fi
567
 
  fi
568
 
 
569
 
  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
570
 
  min_gtk_version=ifelse([$1], ,0.99.7,$1)
571
 
  AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
572
 
  no_gtk=""
573
 
  if test "$GTK_CONFIG" = "no" ; then
574
 
    no_gtk=yes
575
 
  else
576
 
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
577
 
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
578
 
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
579
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
580
 
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
581
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
582
 
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
583
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
584
 
    if test "x$enable_gtktest" = "xyes" ; then
585
 
      ac_save_CFLAGS="$CFLAGS"
586
 
      ac_save_LIBS="$LIBS"
587
 
      CFLAGS="$CFLAGS $GTK_CFLAGS"
588
 
      LIBS="$GTK_LIBS $LIBS"
589
 
dnl
590
 
dnl Now check if the installed GTK is sufficiently new. (Also sanity
591
 
dnl checks the results of gtk-config to some extent
592
 
dnl
593
 
      rm -f conf.gtktest
594
 
      AC_TRY_RUN([
595
 
#include <gtk/gtk.h>
596
 
#include <stdio.h>
597
 
#include <stdlib.h>
598
 
 
599
 
int 
600
 
main ()
601
 
{
602
 
  int major, minor, micro;
603
 
  char *tmp_version;
604
 
 
605
 
  system ("touch conf.gtktest");
606
 
 
607
 
  /* HP/UX 9 (%@#!) writes to sscanf strings */
608
 
  tmp_version = g_strdup("$min_gtk_version");
609
 
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
610
 
     printf("%s, bad version string\n", "$min_gtk_version");
611
 
     exit(1);
612
 
   }
613
 
 
614
 
  if ((gtk_major_version != $gtk_config_major_version) ||
615
 
      (gtk_minor_version != $gtk_config_minor_version) ||
616
 
      (gtk_micro_version != $gtk_config_micro_version))
617
 
    {
618
 
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
619
 
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
620
 
             gtk_major_version, gtk_minor_version, gtk_micro_version);
621
 
      printf ("*** was found! If gtk-config was correct, then it is best\n");
622
 
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
623
 
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
624
 
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
625
 
      printf("*** required on your system.\n");
626
 
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
627
 
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
628
 
      printf("*** before re-running configure\n");
629
 
    } 
630
 
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
631
 
  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
632
 
           (gtk_minor_version != GTK_MINOR_VERSION) ||
633
 
           (gtk_micro_version != GTK_MICRO_VERSION))
634
 
    {
635
 
      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
636
 
             GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
637
 
      printf("*** library (version %d.%d.%d)\n",
638
 
             gtk_major_version, gtk_minor_version, gtk_micro_version);
639
 
    }
640
 
#endif /* defined (GTK_MAJOR_VERSION) ... */
641
 
  else
642
 
    {
643
 
      if ((gtk_major_version > major) ||
644
 
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
645
 
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
646
 
      {
647
 
        return 0;
648
 
       }
649
 
     else
650
 
      {
651
 
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
652
 
               gtk_major_version, gtk_minor_version, gtk_micro_version);
653
 
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
654
 
               major, minor, micro);
655
 
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
656
 
        printf("***\n");
657
 
        printf("*** If you have already installed a sufficiently new version, this error\n");
658
 
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
659
 
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
660
 
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
661
 
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
662
 
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
663
 
        printf("*** so that the correct libraries are found at run-time))\n");
664
 
      }
665
 
    }
666
 
  return 1;
667
 
}
668
 
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
669
 
       CFLAGS="$ac_save_CFLAGS"
670
 
       LIBS="$ac_save_LIBS"
671
 
     fi
672
 
  fi
673
 
  if test "x$no_gtk" = x ; then
674
 
     AC_MSG_RESULT(yes)
675
 
     ifelse([$2], , :, [$2])     
676
 
  else
677
 
     AC_MSG_RESULT(no)
678
 
     if test "$GTK_CONFIG" = "no" ; then
679
 
       echo "*** The gtk-config script installed by GTK could not be found"
680
 
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
681
 
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
682
 
       echo "*** full path to gtk-config."
683
 
     else
684
 
       if test -f conf.gtktest ; then
685
 
        :
686
 
       else
687
 
          echo "*** Could not run GTK test program, checking why..."
688
 
          CFLAGS="$CFLAGS $GTK_CFLAGS"
689
 
          LIBS="$LIBS $GTK_LIBS"
690
 
          AC_TRY_LINK([
691
 
#include <gtk/gtk.h>
692
 
#include <stdio.h>
693
 
],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
694
 
        [ echo "*** The test program compiled, but did not run. This usually means"
695
 
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
696
 
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
697
 
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
698
 
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
699
 
          echo "*** is required on your system"
700
 
          echo "***"
701
 
          echo "*** If you have an old version installed, it is best to remove it, although"
702
 
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
703
 
          echo "***"
704
 
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
705
 
          echo "*** came with the system with the command"
706
 
          echo "***"
707
 
          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
708
 
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
709
 
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
710
 
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
711
 
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
712
 
          CFLAGS="$ac_save_CFLAGS"
713
 
          LIBS="$ac_save_LIBS"
714
 
       fi
715
 
     fi
716
 
     GTK_CFLAGS=""
717
 
     GTK_LIBS=""
718
 
     ifelse([$3], , :, [$3])
719
 
  fi
720
 
  AC_SUBST(GTK_CFLAGS)
721
 
  AC_SUBST(GTK_LIBS)
722
 
  rm -f conf.gtktest
723
 
])
724
 
 
725
 
 
726
 
dnl    This file is part of the KDE libraries/packages
727
 
dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
728
 
dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
729
 
dnl              (C) 2002 g10 Code GmbH
730
 
dnl              Modified for PINENTRY by Marcus Brinkmann.
731
 
dnl
732
 
dnl    This file is free software; you can redistribute it and/or
733
 
dnl    modify it under the terms of the GNU Library General Public
734
 
dnl    License as published by the Free Software Foundation; either
735
 
dnl    version 2 of the License, or (at your option) any later version.
736
 
 
737
 
dnl    This library is distributed in the hope that it will be useful,
738
 
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
739
 
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
740
 
dnl    Library General Public License for more details.
741
 
 
742
 
dnl    You should have received a copy of the GNU Library General Public License
743
 
dnl    along with this library; see the file COPYING.LIB.  If not, write to
744
 
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
745
 
dnl    Boston, MA 02111-1307, USA.
746
 
 
747
 
dnl ------------------------------------------------------------------------
748
 
dnl Find a file (or one of more files in a list of dirs)
749
 
dnl ------------------------------------------------------------------------
750
 
dnl
751
 
AC_DEFUN(QT_FIND_FILE,
752
 
[
753
 
$3=NO
754
 
for i in $2;
755
 
do
756
 
  for j in $1;
757
 
  do
758
 
    echo "configure: __oline__: $i/$j" >&AS_MESSAGE_LOG_FD
759
 
    if test -r "$i/$j"; then
760
 
      echo "taking that" >&AS_MESSAGE_LOG_FD
761
 
      $3=$i
762
 
      break 2
763
 
    fi
764
 
  done
765
 
done
766
 
])
767
 
 
768
 
dnl ------------------------------------------------------------------------
769
 
dnl Find the meta object compiler in the PATH,
770
 
dnl in $QTDIR/bin, and some more usual places
771
 
dnl ------------------------------------------------------------------------
772
 
dnl
773
 
AC_DEFUN(QT_PATH_MOC,
774
 
[
775
 
   qt_bindirs=""
776
 
   for dir in $qt_dirs; do
777
 
      qt_bindirs="$qt_bindirs:$dir/bin:$dir/src/moc"
778
 
   done
779
 
   qt_bindirs="$qt_bindirs:/usr/bin:/usr/X11R6/bin:/usr/local/qt/bin"
780
 
   if test ! "$ac_qt_bindir" = "NO"; then
781
 
      qt_bindirs="$ac_qt_bindir:$qt_bindirs"
782
 
   fi
783
 
 
784
 
   AC_PATH_PROG(MOC, moc, no, [$qt_bindirs])
785
 
   if test "$MOC" = no; then
786
 
    #AC_MSG_ERROR([No Qt meta object compiler (moc) found!
787
 
    #Please check whether you installed Qt correctly.
788
 
    #You need to have a running moc binary.
789
 
    #configure tried to run $ac_cv_path_moc and the test didn't
790
 
    #succeed. If configure shouldn't have tried this one, set
791
 
    #the environment variable MOC to the right one before running
792
 
    #configure.
793
 
    #])
794
 
    have_moc="no"
795
 
   else
796
 
    have_moc="yes"
797
 
    AC_SUBST(MOC)
798
 
   fi
799
 
])
800
 
 
801
 
 
802
 
dnl ------------------------------------------------------------------------
803
 
dnl Find the header files and libraries for the X Window System.
804
 
dnl Extended the macro AC_PATH_XTRA.
805
 
dnl ------------------------------------------------------------------------
806
 
dnl
807
 
AC_DEFUN(QT_PATH_X,
808
 
[
809
 
AC_ARG_ENABLE(
810
 
  embedded,
811
 
  [  --enable-embedded       link to Qt-embedded, don't use X],
812
 
  qt_use_emb=$enableval,
813
 
  qt_use_emb=no
814
 
)
815
 
 
816
 
AC_ARG_ENABLE(
817
 
  palmtop,
818
 
  [  --enable-palmtop       link to Qt-embedded, don't use X, link to the Qt Palmtop Environment],
819
 
  qt_use_emb_palm=$enableval,
820
 
  qt_use_emb_palm=no
821
 
)
822
 
 
823
 
if test "$qt_use_emb" = "no"; then
824
 
  AC_PATH_X
825
 
  AC_PATH_XTRA
826
 
  if test "$no_x" = yes; then
827
 
    AC_MSG_ERROR([Can't find X. Please check your installation and add the correct paths!])
828
 
  fi
829
 
  QT_CXXFLAGS="$X_CFLAGS"
830
 
  QT_LDFLAGS="$X_LIBS"
831
 
  QT_LIBS="$X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
832
 
  QTE_NORTTI=""
833
 
else
834
 
  dnl We're using QT Embedded
835
 
  QT_CXXFLAGS="-fno-rtti -DQWS"
836
 
  QT_LDFLAGS="-DQWS"
837
 
  QT_LIBS=""
838
 
  QTE_NORTTI="-fno-rtti -DQWS"
839
 
fi
840
 
AC_SUBST(QT_CXXFLAGS)
841
 
AC_SUBST(QT_LDFLAGS)
842
 
AC_SUBST(QT_LIBS)
843
 
AC_SUBST(QTE_NORTTI)
844
 
])
845
 
 
846
 
AC_DEFUN(QT_PRINT_PROGRAM,
847
 
[
848
 
AC_REQUIRE([QT_CHECK_VERSION])
849
 
cat > conftest.$ac_ext <<EOF
850
 
#include "confdefs.h"
851
 
#include <qglobal.h>
852
 
#include <qapplication.h>
853
 
EOF
854
 
if test "$qt_ver" = "2"; then
855
 
cat >> conftest.$ac_ext <<EOF
856
 
#include <qevent.h>
857
 
#include <qstring.h>
858
 
#include <qstyle.h>
859
 
EOF
860
 
 
861
 
if test $qt_subver -gt 0; then
862
 
cat >> conftest.$ac_ext <<EOF
863
 
#include <qiconview.h>
864
 
EOF
865
 
fi
866
 
fi
867
 
 
868
 
if test "$qt_ver" = "3"; then
869
 
cat >> conftest.$ac_ext <<EOF
870
 
#include <qcursor.h>
871
 
#include <qstylefactory.h>
872
 
#include <private/qucomextra_p.h>
873
 
EOF
874
 
fi
875
 
 
876
 
echo "#if ! ($qt_verstring)" >> conftest.$ac_ext
877
 
cat >> conftest.$ac_ext <<EOF
878
 
#error 1
879
 
#endif
880
 
 
881
 
int main() {
882
 
EOF
883
 
if test "$qt_ver" = "2"; then
884
 
cat >> conftest.$ac_ext <<EOF
885
 
    QStringList *t = new QStringList();
886
 
    Q_UNUSED(t);
887
 
EOF
888
 
if test $qt_subver -gt 0; then
889
 
cat >> conftest.$ac_ext <<EOF
890
 
    QIconView iv(0);
891
 
    iv.setWordWrapIconText(false);
892
 
    QString s;
893
 
    s.setLatin1("Elvis is alive", 14);
894
 
EOF
895
 
fi
896
 
fi
897
 
if test "$qt_ver" = "3"; then
898
 
cat >> conftest.$ac_ext <<EOF
899
 
    (void)QStyleFactory::create(QString::null);
900
 
    QCursor c(Qt::WhatsThisCursor);
901
 
EOF
902
 
fi
903
 
cat >> conftest.$ac_ext <<EOF
904
 
    return 0;
905
 
}
906
 
EOF
907
 
])
908
 
 
909
 
 
910
 
AC_DEFUN(QT_CHECK_VERSION,
911
 
[
912
 
if test -z "$1"; then
913
 
  qt_ver=3
914
 
  qt_subver=1
915
 
else
916
 
  qt_subver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
917
 
  # following is the check if subversion isn�t found in passed argument
918
 
  if test "$qt_subver" = "$1"; then
919
 
    qt_subver=1
920
 
  fi
921
 
  qt_ver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
922
 
  if test "$qt_ver" = "1"; then
923
 
    qt_subver=42
924
 
  fi
925
 
fi
926
 
 
927
 
if test -z "$2"; then
928
 
  if test "$qt_ver" = "2"; then
929
 
    if test $qt_subver -gt 0; then
930
 
      qt_minversion=">= Qt 2.2.2"
931
 
    else
932
 
      qt_minversion=">= Qt 2.0.2"
933
 
    fi
934
 
  fi
935
 
  if test "$qt_ver" = "3"; then
936
 
    qt_minversion=">= Qt 3.0.1"
937
 
  fi
938
 
  if test "$qt_ver" = "1"; then
939
 
    qt_minversion=">= 1.42 and < 2.0"
940
 
  fi
941
 
else
942
 
   qt_minversion=$2
943
 
fi
944
 
 
945
 
if test -z "$3"; then
946
 
   if test $qt_ver = 3; then
947
 
     qt_verstring="QT_VERSION >= 301"
948
 
   fi
949
 
   if test $qt_ver = 2; then
950
 
     if test $qt_subver -gt 0; then
951
 
       qt_verstring="QT_VERSION >= 222"
952
 
     else
953
 
       qt_verstring="QT_VERSION >= 200"
954
 
     fi
955
 
   fi
956
 
   if test $qt_ver = 1; then
957
 
    qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
958
 
   fi
959
 
else
960
 
   qt_verstring=$3
961
 
fi
962
 
 
963
 
if test $qt_ver = 3; then
964
 
  qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
965
 
fi
966
 
if test $qt_ver = 2; then
967
 
  qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
968
 
fi
969
 
if test $qt_ver = 1; then
970
 
  qt_dirs="$QTDIR /usr/lib/qt"
971
 
fi
972
 
])
973
 
 
974
 
 
975
 
AC_DEFUN(QT_CHECK_DIRECT,
976
 
[
977
 
AC_REQUIRE([QT_CHECK_VERSION])
978
 
AC_MSG_CHECKING([if Qt compiles without flags])
979
 
AC_CACHE_VAL(kde_cv_qt_direct,
980
 
[
981
 
AC_LANG_PUSH(C++)
982
 
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
983
 
ac_LIBRARY_PATH="$LIBRARY_PATH"
984
 
ac_cxxflags_safe="$CXXFLAGS"
985
 
ac_ldflags_safe="$LDFLAGS"
986
 
ac_libs_safe="$LIBS"
987
 
 
988
 
CXXFLAGS="$CXXFLAGS -I$qt_includes"
989
 
LDFLAGS="$LDFLAGS $QT_LDFLAGS"
990
 
LIBS="$QT_LIBS"
991
 
LD_LIBRARY_PATH=
992
 
export LD_LIBRARY_PATH
993
 
LIBRARY_PATH=
994
 
export LIBRARY_PATH
995
 
 
996
 
QT_PRINT_PROGRAM
997
 
 
998
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
999
 
  kde_cv_qt_direct="yes"
1000
 
else
1001
 
  kde_cv_qt_direct="no"
1002
 
  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
1003
 
  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
1004
 
fi
1005
 
 
1006
 
rm -f conftest*
1007
 
CXXFLAGS="$ac_cxxflags_safe"
1008
 
LDFLAGS="$ac_ldflags_safe"
1009
 
LIBS="$ac_libs_safe"
1010
 
 
1011
 
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1012
 
export LD_LIBRARY_PATH
1013
 
LIBRARY_PATH="$ac_LIBRARY_PATH"
1014
 
export LIBRARY_PATH
1015
 
AC_LANG_POP(C++)
1016
 
])
1017
 
 
1018
 
if test "$kde_cv_qt_direct" = "yes"; then
1019
 
  AC_MSG_RESULT(yes)
1020
 
  $1
 
14
# lib-ld.m4 serial 3 (gettext-0.13)
 
15
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
16
dnl This file is free software, distributed under the terms of the GNU
 
17
dnl General Public License.  As a special exception to the GNU General
 
18
dnl Public License, this file may be distributed as part of a program
 
19
dnl that contains a configuration script generated by Autoconf, under
 
20
dnl the same distribution terms as the rest of that program.
 
21
 
 
22
dnl Subroutines of libtool.m4,
 
23
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
24
dnl with libtool.m4.
 
25
 
 
26
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
27
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
28
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
29
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
30
case `$LD -v 2>&1 </dev/null` in
 
31
*GNU* | *'with BFD'*)
 
32
  acl_cv_prog_gnu_ld=yes ;;
 
33
*)
 
34
  acl_cv_prog_gnu_ld=no ;;
 
35
esac])
 
36
with_gnu_ld=$acl_cv_prog_gnu_ld
 
37
])
 
38
 
 
39
dnl From libtool-1.4. Sets the variable LD.
 
40
AC_DEFUN([AC_LIB_PROG_LD],
 
41
[AC_ARG_WITH(gnu-ld,
 
42
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
43
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
44
AC_REQUIRE([AC_PROG_CC])dnl
 
45
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
46
# Prepare PATH_SEPARATOR.
 
47
# The user is always right.
 
48
if test "${PATH_SEPARATOR+set}" != set; then
 
49
  echo "#! /bin/sh" >conf$$.sh
 
50
  echo  "exit 0"   >>conf$$.sh
 
51
  chmod +x conf$$.sh
 
52
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
53
    PATH_SEPARATOR=';'
 
54
  else
 
55
    PATH_SEPARATOR=:
 
56
  fi
 
57
  rm -f conf$$.sh
 
58
fi
 
59
ac_prog=ld
 
60
if test "$GCC" = yes; then
 
61
  # Check if gcc -print-prog-name=ld gives a path.
 
62
  AC_MSG_CHECKING([for ld used by GCC])
 
63
  case $host in
 
64
  *-*-mingw*)
 
65
    # gcc leaves a trailing carriage return which upsets mingw
 
66
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
67
  *)
 
68
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
69
  esac
 
70
  case $ac_prog in
 
71
    # Accept absolute paths.
 
72
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
73
      [re_direlt='/[^/][^/]*/\.\./']
 
74
      # Canonicalize the path of ld
 
75
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
76
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
77
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
78
      done
 
79
      test -z "$LD" && LD="$ac_prog"
 
80
      ;;
 
81
  "")
 
82
    # If it fails, then pretend we aren't using GCC.
 
83
    ac_prog=ld
 
84
    ;;
 
85
  *)
 
86
    # If it is relative, then search for the first ld in PATH.
 
87
    with_gnu_ld=unknown
 
88
    ;;
 
89
  esac
 
90
elif test "$with_gnu_ld" = yes; then
 
91
  AC_MSG_CHECKING([for GNU ld])
 
92
else
 
93
  AC_MSG_CHECKING([for non-GNU ld])
 
94
fi
 
95
AC_CACHE_VAL(acl_cv_path_LD,
 
96
[if test -z "$LD"; then
 
97
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
98
  for ac_dir in $PATH; do
 
99
    test -z "$ac_dir" && ac_dir=.
 
100
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
101
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
102
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
103
      # but apparently some GNU ld's only accept -v.
 
104
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
105
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
106
      *GNU* | *'with BFD'*)
 
107
        test "$with_gnu_ld" != no && break ;;
 
108
      *)
 
109
        test "$with_gnu_ld" != yes && break ;;
 
110
      esac
 
111
    fi
 
112
  done
 
113
  IFS="$ac_save_ifs"
 
114
else
 
115
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
116
fi])
 
117
LD="$acl_cv_path_LD"
 
118
if test -n "$LD"; then
 
119
  AC_MSG_RESULT($LD)
1021
120
else
1022
121
  AC_MSG_RESULT(no)
1023
 
  $2
1024
 
fi
1025
 
])
1026
 
 
1027
 
dnl ------------------------------------------------------------------------
1028
 
dnl Try to find the Qt headers and libraries.
1029
 
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1030
 
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1031
 
dnl ------------------------------------------------------------------------
1032
 
dnl
1033
 
AC_DEFUN(QT_PATH_1_3,
1034
 
[
1035
 
AC_REQUIRE([QT_PATH_X])
1036
 
AC_REQUIRE([QT_CHECK_VERSION])
1037
 
 
1038
 
dnl ------------------------------------------------------------------------
1039
 
dnl Add configure flag to enable linking to MT version of Qt library.
1040
 
dnl ------------------------------------------------------------------------
1041
 
 
1042
 
AC_ARG_ENABLE(
1043
 
  mt,
1044
 
  [  --disable-mt            link to non-threaded Qt (deprecated)],
1045
 
  qt_use_mt=$enableval,
1046
 
  [
1047
 
    if test $qt_ver = 3; then
1048
 
      qt_use_mt=yes
1049
 
    else
1050
 
      qt_use_mt=no
1051
 
    fi
1052
 
  ]
1053
 
)
1054
 
 
1055
 
USING_QT_MT=""
1056
 
 
1057
 
dnl ------------------------------------------------------------------------
1058
 
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1059
 
dnl ------------------------------------------------------------------------
1060
 
 
1061
 
QT_MT_LDFLAGS=
1062
 
QT_MT_LIBS=
1063
 
if test "x$qt_use_mt" = "xyes"; then
1064
 
  QT_CHECK_THREADING
1065
 
  if test "x$qt_use_threading" = "xyes"; then
1066
 
    QT_CXXFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $QT_CXXFLAGS"
1067
 
    QT_MT_LDFLAGS="$USE_THREADS"
1068
 
    QT_MT_LIBS="$LIBPTHREAD"
1069
 
  else
1070
 
    qt_use_mt=no
1071
 
  fi
1072
 
fi
1073
 
AC_SUBST(QT_MT_LDFLAGS)
1074
 
AC_SUBST(QT_MT_LIBS)
1075
 
 
1076
 
dnl ------------------------------------------------------------------------
1077
 
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1078
 
dnl ------------------------------------------------------------------------
1079
 
if test -z "$LIBQT_GLOB"; then
1080
 
  if test "x$qt_use_emb" = "xyes"; then
1081
 
    LIBQT_GLOB="libqte.*"
1082
 
  else
1083
 
    LIBQT_GLOB="libqt.*"
1084
 
  fi
1085
 
fi
1086
 
 
1087
 
if test -z "$LIBQT"; then
1088
 
dnl ------------------------------------------------------------
1089
 
dnl If we got --enable-embedded then adjust the Qt library name.
1090
 
dnl ------------------------------------------------------------
1091
 
  if test "x$qt_use_emb" = "xyes"; then
1092
 
    qtlib="qte"
1093
 
  else
1094
 
    qtlib="qt"
1095
 
  fi
1096
 
fi
1097
 
 
1098
 
if test -z "$LIBQPE"; then
1099
 
dnl ------------------------------------------------------------
1100
 
dnl If we got --enable-palmtop then add -lqpe to the link line
1101
 
dnl ------------------------------------------------------------
1102
 
  if test "x$qt_use_emb" = "xyes"; then
1103
 
    if test "x$qt_use_emb_palm" = "xyes"; then
1104
 
      LIB_QPE="-lqpe"
1105
 
    else
1106
 
      LIB_QPE=""
1107
 
    fi
1108
 
  else
1109
 
    LIB_QPE=""
1110
 
  fi
1111
 
fi
1112
 
 
1113
 
dnl ------------------------------------------------------------------------
1114
 
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1115
 
dnl ------------------------------------------------------------------------
1116
 
 
1117
 
if test "x$qt_use_mt" = "xyes"; then
1118
 
  if test -z "$LIBQT"; then
1119
 
    LIBQT="-l$qtlib-mt"
1120
 
  else
1121
 
    LIBQT="$qtlib-mt"
1122
 
  fi
1123
 
  LIBQT_GLOB="lib$qtlib-mt.*"
1124
 
  USING_QT_MT="using -mt"
1125
 
else
1126
 
  LIBQT="-l$qtlib"
1127
 
fi
1128
 
 
1129
 
AC_MSG_CHECKING([for Qt])
1130
 
 
1131
 
QT_LIBS="$LIBQT $QT_LIBS"
1132
 
test -z "$QT_MT_LIBS" || QT_LIBS="$QT_LIBS $QT_MT_LIBS"
1133
 
 
1134
 
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1135
 
qt_libraries=""
1136
 
qt_includes=""
1137
 
AC_ARG_WITH(qt-dir,
1138
 
    [  --with-qt-dir=DIR       where the root of Qt is installed ],
1139
 
    [  ac_qt_includes="$withval"/include
1140
 
       ac_qt_libraries="$withval"/lib
1141
 
       ac_qt_bindir="$withval"/bin
1142
 
    ])
1143
 
 
1144
 
AC_ARG_WITH(qt-includes,
1145
 
    [  --with-qt-includes=DIR  where the Qt includes are. ],
1146
 
    [
1147
 
       ac_qt_includes="$withval"
1148
 
    ])
1149
 
 
1150
 
kde_qt_libs_given=no
1151
 
 
1152
 
AC_ARG_WITH(qt-libraries,
1153
 
    [  --with-qt-libraries=DIR where the Qt library is installed.],
1154
 
    [  ac_qt_libraries="$withval"
1155
 
       kde_qt_libs_given=yes
1156
 
    ])
1157
 
 
1158
 
AC_CACHE_VAL(ac_cv_have_qt,
1159
 
[#try to guess Qt locations
1160
 
 
1161
 
qt_incdirs=""
1162
 
for dir in $qt_dirs; do
1163
 
   qt_incdirs="$qt_incdirs $dir/include $dir"
1164
 
done
1165
 
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include  /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
1166
 
if test ! "$ac_qt_includes" = "NO"; then
1167
 
   qt_incdirs="$ac_qt_includes $qt_incdirs"
1168
 
fi
1169
 
 
1170
 
if test "$qt_ver" != "1"; then
1171
 
  kde_qt_header=qstyle.h
1172
 
else
1173
 
  kde_qt_header=qglobal.h
1174
 
fi
1175
 
 
1176
 
QT_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1177
 
ac_qt_includes="$qt_incdir"
1178
 
 
1179
 
qt_libdirs=""
1180
 
for dir in $qt_dirs; do
1181
 
   qt_libdirs="$qt_libdirs $dir/lib $dir"
1182
 
done
1183
 
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1184
 
if test ! "$ac_qt_libraries" = "NO"; then
1185
 
  qt_libdir=$ac_qt_libraries
1186
 
else
1187
 
  qt_libdirs="$ac_qt_libraries $qt_libdirs"
1188
 
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
1189
 
  qt_libdir=NONE
1190
 
  for dir in $qt_libdirs; do
1191
 
    try="ls -1 $dir/${LIBQT_GLOB}"
1192
 
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AS_MESSAGE_LOG_FD; fi
1193
 
  done
1194
 
fi
1195
 
 
1196
 
ac_qt_libraries="$qt_libdir"
1197
 
 
1198
 
AC_LANG_PUSH(C++)
1199
 
 
1200
 
ac_cxxflags_safe="$CXXFLAGS"
1201
 
ac_ldflags_safe="$LDFLAGS"
1202
 
ac_libs_safe="$LIBS"
1203
 
 
1204
 
CXXFLAGS="$CXXFLAGS -I$qt_incdir $QT_CXXFLAGS"
1205
 
LDFLAGS="$LDFLAGS -L$qt_libdir $QT_LDFLAGS"
1206
 
LIBS="$LIBS $QT_LIBS"
1207
 
 
1208
 
QT_PRINT_PROGRAM
1209
 
 
1210
 
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1211
 
  rm -f conftest*
1212
 
else
1213
 
  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
1214
 
  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
1215
 
  ac_qt_libraries="NO"
1216
 
fi
1217
 
rm -f conftest*
1218
 
CXXFLAGS="$ac_cxxflags_safe"
1219
 
LDFLAGS="$ac_ldflags_safe"
1220
 
LIBS="$ac_libs_safe"
1221
 
 
1222
 
AC_LANG_POP(C++)
1223
 
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1224
 
  ac_cv_have_qt="have_qt=no"
1225
 
  ac_qt_notfound=""
1226
 
  missing_qt_mt=""
1227
 
  if test "$ac_qt_includes" = NO; then
1228
 
    if test "$ac_qt_libraries" = NO; then
1229
 
      ac_qt_notfound="(headers and libraries)";
1230
 
    else
1231
 
      ac_qt_notfound="(headers)";
1232
 
    fi
1233
 
  else
1234
 
    if test "x$qt_use_mt" = "xyes"; then
1235
 
       missing_qt_mt="
1236
 
Make sure that you have compiled Qt with thread support!"
1237
 
       ac_qt_notfound="(library $qtlib-mt)";
1238
 
    else
1239
 
       ac_qt_notfound="(library $qtlib)";
1240
 
    fi
1241
 
  fi
1242
 
 
1243
 
  #AC_MSG_ERROR([Qt ($qt_minversion) $ac_qt_notfound not found. Please check your installation!
1244
 
  #For more details about this problem, look at the end of config.log.$missing_qt_mt])
1245
 
  have_qt="no"
1246
 
else
1247
 
  have_qt="yes"
1248
 
fi
1249
 
])
1250
 
 
1251
 
eval "$ac_cv_have_qt"
1252
 
 
1253
 
if test "$have_qt" != yes; then
1254
 
  AC_MSG_RESULT([$have_qt]);
1255
 
else
1256
 
  ac_cv_have_qt="have_qt=yes \
1257
 
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1258
 
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1259
 
 
1260
 
  qt_libraries="$ac_qt_libraries"
1261
 
  qt_includes="$ac_qt_includes"
1262
 
fi
1263
 
 
1264
 
if test ! "$kde_qt_libs_given" = "yes"; then
1265
 
QT_CHECK_DIRECT(qt_libraries= ,[])
1266
 
fi
1267
 
 
1268
 
AC_SUBST(qt_libraries)
1269
 
AC_SUBST(qt_includes)
1270
 
 
1271
 
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1272
 
 QT_INCLUDES=""
1273
 
else
1274
 
 QT_INCLUDES="-I$qt_includes"
1275
 
fi
1276
 
 
1277
 
if test "$qt_libraries" != "$x_libraries" && test -n "$qt_libraries"; then
1278
 
 QT_LDFLAGS="$QT_LDFLAGS -L$qt_libraries"
1279
 
fi
1280
 
test -z "$QT_MT_LDFLAGS" || QT_LDFLAGS="$QT_LDFLAGS $QT_MT_LDFLAGS"
1281
 
 
1282
 
AC_SUBST(QT_INCLUDES)
1283
 
QT_PATH_MOC
1284
 
 
1285
 
 
1286
 
AC_SUBST(LIB_QPE)
1287
 
])
1288
 
 
1289
 
AC_DEFUN(QT_PATH,
1290
 
[
1291
 
QT_PATH_1_3
1292
 
QT_CHECK_RPATH
1293
 
])
1294
 
 
1295
 
 
1296
 
AC_DEFUN(QT_CHECK_COMPILER_FLAG,
1297
 
[
1298
 
AC_MSG_CHECKING(whether $CXX supports -$1)
1299
 
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
1300
 
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
1301
 
[
1302
 
  AC_LANG_PUSH(C++)
1303
 
  save_CXXFLAGS="$CXXFLAGS"
1304
 
  CXXFLAGS="$CXXFLAGS -$1"
1305
 
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
1306
 
  CXXFLAGS="$save_CXXFLAGS"
1307
 
  AC_LANG_POP(C++)
1308
 
])
1309
 
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
1310
 
 AC_MSG_RESULT(yes)
1311
 
 :
1312
 
 $2
1313
 
else
1314
 
 AC_MSG_RESULT(no)
1315
 
 :
1316
 
 $3
1317
 
fi
1318
 
])
1319
 
 
1320
 
dnl QT_REMOVE_FORBIDDEN removes forbidden arguments from variables
1321
 
dnl use: QT_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
1322
 
dnl it's all white-space separated
1323
 
AC_DEFUN(QT_REMOVE_FORBIDDEN,
1324
 
[ __val=$$1
1325
 
  __forbid=" $2 "
1326
 
  if test -n "$__val"; then
1327
 
    __new=""
1328
 
    ac_save_IFS=$IFS
1329
 
    IFS="       "
1330
 
    for i in $__val; do
1331
 
      case "$__forbid" in
1332
 
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
1333
 
        *) # Careful to not add spaces, where there were none, because otherwise
1334
 
           # libtool gets confused, if we change e.g. CXX
1335
 
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
1336
 
      esac
1337
 
    done
1338
 
    IFS=$ac_save_IFS
1339
 
    $1=$__new
1340
 
  fi
1341
 
])
1342
 
 
1343
 
dnl QT_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
1344
 
AC_DEFUN(QT_VALIDIFY_CXXFLAGS,
1345
 
[dnl
1346
 
if test "x$qt_use_emb" != "xyes"; then
1347
 
 QT_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
1348
 
 QT_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
1349
 
else
1350
 
 QT_REMOVE_FORBIDDEN(CXX, [-rpath])
1351
 
 QT_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
1352
 
fi
1353
 
])
1354
 
 
1355
 
AC_DEFUN(QT_CHECK_COMPILERS,
1356
 
[
1357
 
  AC_PROG_CXX
1358
 
 
1359
 
  QT_CHECK_COMPILER_FLAG(fexceptions,[QT_CXXFLAGS="$QT_CXXFLAGS -fexceptions"])
1360
 
 
1361
 
  case "$host" in
1362
 
      *-*-irix*)  test "$GXX" = yes && QT_CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $QT_CXXFLAGS" ;;
1363
 
      *-*-sysv4.2uw*) QT_CXXFLAGS="-D_UNIXWARE $QT_CXXFLAGS";;
1364
 
      *-*-sysv5uw7*) QT_CXXFLAGS="-D_UNIXWARE7 $QT_CXXFLAGS";;
1365
 
      *-*-solaris*) 
1366
 
        if test "$GXX" = yes; then
1367
 
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
1368
 
          if test ! -f $libstdcpp; then
1369
 
             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with the Qt pinentry. Please recompile gcc with --enable-shared to receive a libstdc++.so])
 
122
fi
 
123
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
124
AC_LIB_PROG_LD_GNU
 
125
])
 
126
 
 
127
# lib-link.m4 serial 4 (gettext-0.12)
 
128
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
129
dnl This file is free software, distributed under the terms of the GNU
 
130
dnl General Public License.  As a special exception to the GNU General
 
131
dnl Public License, this file may be distributed as part of a program
 
132
dnl that contains a configuration script generated by Autoconf, under
 
133
dnl the same distribution terms as the rest of that program.
 
134
 
 
135
dnl From Bruno Haible.
 
136
 
 
137
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
138
dnl the libraries corresponding to explicit and implicit dependencies.
 
139
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
140
dnl augments the CPPFLAGS variable.
 
141
AC_DEFUN([AC_LIB_LINKFLAGS],
 
142
[
 
143
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
144
  AC_REQUIRE([AC_LIB_RPATH])
 
145
  define([Name],[translit([$1],[./-], [___])])
 
146
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
147
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
148
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
149
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
150
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
151
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
152
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
153
  ])
 
154
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
155
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
156
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
157
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
158
  AC_SUBST([LIB]NAME)
 
159
  AC_SUBST([LTLIB]NAME)
 
160
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
161
  dnl results of this search when this library appears as a dependency.
 
162
  HAVE_LIB[]NAME=yes
 
163
  undefine([Name])
 
164
  undefine([NAME])
 
165
])
 
166
 
 
167
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
168
dnl searches for libname and the libraries corresponding to explicit and
 
169
dnl implicit dependencies, together with the specified include files and
 
170
dnl the ability to compile and link the specified testcode. If found, it
 
171
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
172
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
173
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
174
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
175
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
176
[
 
177
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
178
  AC_REQUIRE([AC_LIB_RPATH])
 
179
  define([Name],[translit([$1],[./-], [___])])
 
180
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
181
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
182
 
 
183
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
184
  dnl accordingly.
 
185
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
186
 
 
187
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
188
  dnl because if the user has installed lib[]Name and not disabled its use
 
189
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
190
  ac_save_CPPFLAGS="$CPPFLAGS"
 
191
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
192
 
 
193
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
194
    ac_save_LIBS="$LIBS"
 
195
    LIBS="$LIBS $LIB[]NAME"
 
196
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
197
    LIBS="$ac_save_LIBS"
 
198
  ])
 
199
  if test "$ac_cv_lib[]Name" = yes; then
 
200
    HAVE_LIB[]NAME=yes
 
201
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
202
    AC_MSG_CHECKING([how to link with lib[]$1])
 
203
    AC_MSG_RESULT([$LIB[]NAME])
 
204
  else
 
205
    HAVE_LIB[]NAME=no
 
206
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
207
    dnl $INC[]NAME either.
 
208
    CPPFLAGS="$ac_save_CPPFLAGS"
 
209
    LIB[]NAME=
 
210
    LTLIB[]NAME=
 
211
  fi
 
212
  AC_SUBST([HAVE_LIB]NAME)
 
213
  AC_SUBST([LIB]NAME)
 
214
  AC_SUBST([LTLIB]NAME)
 
215
  undefine([Name])
 
216
  undefine([NAME])
 
217
])
 
218
 
 
219
dnl Determine the platform dependent parameters needed to use rpath:
 
220
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
221
dnl hardcode_direct, hardcode_minus_L.
 
222
AC_DEFUN([AC_LIB_RPATH],
 
223
[
 
224
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
225
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
226
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
227
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
228
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
229
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
230
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
231
    . ./conftest.sh
 
232
    rm -f ./conftest.sh
 
233
    acl_cv_rpath=done
 
234
  ])
 
235
  wl="$acl_cv_wl"
 
236
  libext="$acl_cv_libext"
 
237
  shlibext="$acl_cv_shlibext"
 
238
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
239
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
240
  hardcode_direct="$acl_cv_hardcode_direct"
 
241
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
242
  dnl Determine whether the user wants rpath handling at all.
 
243
  AC_ARG_ENABLE(rpath,
 
244
    [  --disable-rpath         do not hardcode runtime library paths],
 
245
    :, enable_rpath=yes)
 
246
])
 
247
 
 
248
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
249
dnl the libraries corresponding to explicit and implicit dependencies.
 
250
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
251
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
252
[
 
253
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
254
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
255
  dnl By default, look in $includedir and $libdir.
 
256
  use_additional=yes
 
257
  AC_LIB_WITH_FINAL_PREFIX([
 
258
    eval additional_includedir=\"$includedir\"
 
259
    eval additional_libdir=\"$libdir\"
 
260
  ])
 
261
  AC_LIB_ARG_WITH([lib$1-prefix],
 
262
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
263
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
264
[
 
265
    if test "X$withval" = "Xno"; then
 
266
      use_additional=no
 
267
    else
 
268
      if test "X$withval" = "X"; then
 
269
        AC_LIB_WITH_FINAL_PREFIX([
 
270
          eval additional_includedir=\"$includedir\"
 
271
          eval additional_libdir=\"$libdir\"
 
272
        ])
 
273
      else
 
274
        additional_includedir="$withval/include"
 
275
        additional_libdir="$withval/lib"
 
276
      fi
 
277
    fi
 
278
])
 
279
  dnl Search the library and its dependencies in $additional_libdir and
 
280
  dnl $LDFLAGS. Using breadth-first-seach.
 
281
  LIB[]NAME=
 
282
  LTLIB[]NAME=
 
283
  INC[]NAME=
 
284
  rpathdirs=
 
285
  ltrpathdirs=
 
286
  names_already_handled=
 
287
  names_next_round='$1 $2'
 
288
  while test -n "$names_next_round"; do
 
289
    names_this_round="$names_next_round"
 
290
    names_next_round=
 
291
    for name in $names_this_round; do
 
292
      already_handled=
 
293
      for n in $names_already_handled; do
 
294
        if test "$n" = "$name"; then
 
295
          already_handled=yes
 
296
          break
 
297
        fi
 
298
      done
 
299
      if test -z "$already_handled"; then
 
300
        names_already_handled="$names_already_handled $name"
 
301
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
302
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
303
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
304
        eval value=\"\$HAVE_LIB$uppername\"
 
305
        if test -n "$value"; then
 
306
          if test "$value" = yes; then
 
307
            eval value=\"\$LIB$uppername\"
 
308
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
309
            eval value=\"\$LTLIB$uppername\"
 
310
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
311
          else
 
312
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
313
            dnl that this library doesn't exist. So just drop it.
 
314
            :
1370
315
          fi
1371
 
        fi
1372
 
        ;;
1373
 
  esac
1374
 
 
1375
 
  QT_VALIDIFY_CXXFLAGS
1376
 
 
1377
 
  AC_PROG_CXXCPP
1378
 
])
1379
 
 
1380
 
AC_DEFUN(QT_CHECK_RPATH,
1381
 
[
1382
 
AC_MSG_CHECKING(for rpath)
1383
 
AC_ARG_ENABLE(rpath,
1384
 
      [  --disable-rpath         do not use the rpath feature of ld],
1385
 
      USE_RPATH=$enableval, USE_RPATH=yes)
1386
 
 
1387
 
if test -z "$QT_RPATH" && test "$USE_RPATH" = "yes"; then
1388
 
 
1389
 
  QT_RPATH=""
1390
 
  if test -n "$qt_libraries"; then
1391
 
    QT_RPATH="$QT_RPATH -Wl,--rpath -Wl,\$(qt_libraries)"
1392
 
  fi
1393
 
  dnl $x_libraries is set to /usr/lib in case
1394
 
  if test -n "$X_LIBS"; then
1395
 
    QT_RPATH="$QT_RPATH -Wl,--rpath -Wl,\$(x_libraries)"
1396
 
  fi
1397
 
fi
1398
 
AC_SUBST(x_libraries)
1399
 
AC_SUBST(QT_RPATH)
1400
 
AC_MSG_RESULT($USE_RPATH)
1401
 
])
1402
 
 
1403
 
 
1404
 
AC_DEFUN(QT_CHECK_LIBPTHREAD,
1405
 
[
1406
 
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
1407
 
AC_SUBST(LIBPTHREAD)
1408
 
])
1409
 
 
1410
 
AC_DEFUN(QT_CHECK_PTHREAD_OPTION,
1411
 
[
1412
 
    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
1413
 
        kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
1414
 
 
1415
 
    if test "$kde_use_kernthreads" = "yes"; then
1416
 
      ac_save_CXXFLAGS="$CXXFLAGS"
1417
 
      ac_save_CFLAGS="$CXXFLAGS"
1418
 
      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
1419
 
      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
1420
 
      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
1421
 
      CXXFLAGS="$ac_save_CXXFLAGS"
1422
 
      CFLAGS="$ac_save_CFLAGS"
1423
 
      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
1424
 
        kde_use_kernthreads=no
1425
 
      else
1426
 
        dnl Add proper -I and -l statements
1427
 
        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
1428
 
        if test "x$LIBPTHREAD" = "x"; then
1429
 
          kde_use_kernthreads=no
1430
316
        else
1431
 
          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
1432
 
        fi
1433
 
      fi
1434
 
    else 
1435
 
      USE_THREADS=""
1436
 
      if test -z "$LIBPTHREAD"; then
1437
 
        QT_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
1438
 
      fi
1439
 
    fi
1440
 
 
1441
 
    case $host_os in
1442
 
        solaris*)
1443
 
                QT_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
1444
 
                QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
1445
 
                ;;
1446
 
        freebsd*)
1447
 
                QT_CXXFLAGS="$QT_CXXFLAGS -D_THREAD_SAFE"
1448
 
                ;;
1449
 
        aix*)
1450
 
                QT_CXXFLAGS="$QT_CXXFLAGS -D_THREAD_SAFE"
1451
 
                LIBPTHREAD="$LIBPTHREAD -lc_r"
1452
 
                ;;
1453
 
        linux*) QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT"
1454
 
                if test "$CXX" = "KCC"; then
1455
 
                  QT_CXXFLAGS="$QT_CXXFLAGS --thread_safe"
1456
 
                fi
1457
 
                ;;
1458
 
        *)
1459
 
                ;;
1460
 
    esac
1461
 
    AC_SUBST(USE_THREADS)
1462
 
    AC_SUBST(LIBPTHREAD)
1463
 
])
1464
 
 
1465
 
AC_DEFUN(QT_CHECK_THREADING,
1466
 
[
1467
 
  AC_REQUIRE([QT_CHECK_LIBPTHREAD])
1468
 
  AC_REQUIRE([QT_CHECK_PTHREAD_OPTION])
1469
 
  dnl default is yes if libpthread is found and no if no libpthread is available
1470
 
  if test -z "$LIBPTHREAD"; then
1471
 
    if test -z "$USE_THREADS"; then
1472
 
      kde_check_threading_default=no
1473
 
    else
1474
 
      kde_check_threading_default=yes
1475
 
    fi
1476
 
  else
1477
 
    kde_check_threading_default=yes
1478
 
  fi
1479
 
  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
1480
 
   qt_use_threading=$enableval, qt_use_threading=$kde_check_threading_default)
1481
 
  if test "x$qt_use_threading" = "xyes"; then
1482
 
    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
1483
 
  fi
1484
 
])
1485
 
 
1486
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1487
 
 
1488
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1489
 
 
1490
 
# This program is free software; you can redistribute it and/or modify
1491
 
# it under the terms of the GNU General Public License as published by
1492
 
# the Free Software Foundation; either version 2, or (at your option)
1493
 
# any later version.
1494
 
 
1495
 
# This program is distributed in the hope that it will be useful,
1496
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1497
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1498
 
# GNU General Public License for more details.
1499
 
 
1500
 
# You should have received a copy of the GNU General Public License
1501
 
# along with this program; if not, write to the Free Software
1502
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1503
 
# 02111-1307, USA.
1504
 
 
1505
 
AC_PREREQ([2.52])
1506
 
 
1507
 
# serial 6
1508
 
 
1509
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1510
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1511
 
 
1512
 
# Do all the work for Automake.                            -*- Autoconf -*-
1513
 
 
1514
 
# This macro actually does too much some checks are only needed if
1515
 
# your package does certain things.  But this isn't really a big deal.
1516
 
 
1517
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1518
 
# Free Software Foundation, Inc.
1519
 
 
1520
 
# This program is free software; you can redistribute it and/or modify
1521
 
# it under the terms of the GNU General Public License as published by
1522
 
# the Free Software Foundation; either version 2, or (at your option)
1523
 
# any later version.
1524
 
 
1525
 
# This program is distributed in the hope that it will be useful,
1526
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1527
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1528
 
# GNU General Public License for more details.
1529
 
 
1530
 
# You should have received a copy of the GNU General Public License
1531
 
# along with this program; if not, write to the Free Software
1532
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1533
 
# 02111-1307, USA.
1534
 
 
1535
 
# serial 10
1536
 
 
1537
 
AC_PREREQ([2.54])
1538
 
 
1539
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
1540
 
# the ones we care about.
1541
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1542
 
 
1543
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1544
 
# AM_INIT_AUTOMAKE([OPTIONS])
1545
 
# -----------------------------------------------
1546
 
# The call with PACKAGE and VERSION arguments is the old style
1547
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
1548
 
# and VERSION should now be passed to AC_INIT and removed from
1549
 
# the call to AM_INIT_AUTOMAKE.
1550
 
# We support both call styles for the transition.  After
1551
 
# the next Automake release, Autoconf can make the AC_INIT
1552
 
# arguments mandatory, and then we can depend on a new Autoconf
1553
 
# release and drop the old call support.
1554
 
AC_DEFUN([AM_INIT_AUTOMAKE],
1555
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1556
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
1557
 
# test to see if srcdir already configured
1558
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
1559
 
   test -f $srcdir/config.status; then
1560
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1561
 
fi
1562
 
 
1563
 
# test whether we have cygpath
1564
 
if test -z "$CYGPATH_W"; then
1565
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
1566
 
    CYGPATH_W='cygpath -w'
1567
 
  else
1568
 
    CYGPATH_W=echo
1569
 
  fi
1570
 
fi
1571
 
AC_SUBST([CYGPATH_W])
1572
 
 
1573
 
# Define the identity of the package.
1574
 
dnl Distinguish between old-style and new-style calls.
1575
 
m4_ifval([$2],
1576
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1577
 
 AC_SUBST([PACKAGE], [$1])dnl
1578
 
 AC_SUBST([VERSION], [$2])],
1579
 
[_AM_SET_OPTIONS([$1])dnl
1580
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1581
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1582
 
 
1583
 
_AM_IF_OPTION([no-define],,
1584
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1585
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1586
 
 
1587
 
# Some tools Automake needs.
1588
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
1589
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1590
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1591
 
AM_MISSING_PROG(AUTOCONF, autoconf)
1592
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1593
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
1594
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
1595
 
AM_MISSING_PROG(AMTAR, tar)
1596
 
AM_PROG_INSTALL_SH
1597
 
AM_PROG_INSTALL_STRIP
1598
 
# We need awk for the "check" target.  The system "awk" is bad on
1599
 
# some platforms.
1600
 
AC_REQUIRE([AC_PROG_AWK])dnl
1601
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1602
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1603
 
 
1604
 
_AM_IF_OPTION([no-dependencies],,
1605
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1606
 
                  [_AM_DEPENDENCIES(CC)],
1607
 
                  [define([AC_PROG_CC],
1608
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1609
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1610
 
                  [_AM_DEPENDENCIES(CXX)],
1611
 
                  [define([AC_PROG_CXX],
1612
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1613
 
])
1614
 
])
1615
 
 
1616
 
 
1617
 
# When config.status generates a header, we must update the stamp-h file.
1618
 
# This file resides in the same directory as the config header
1619
 
# that is generated.  The stamp files are numbered to have different names.
1620
 
 
1621
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1622
 
# loop where config.status creates the headers, so we can generate
1623
 
# our stamp files there.
1624
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1625
 
[# Compute $1's index in $config_headers.
1626
 
_am_stamp_count=1
1627
 
for _am_header in $config_headers :; do
1628
 
  case $_am_header in
1629
 
    $1 | $1:* )
1630
 
      break ;;
1631
 
    * )
1632
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1633
 
  esac
1634
 
done
1635
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1636
 
 
1637
 
# Copyright 2002  Free Software Foundation, Inc.
 
317
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
318
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
319
          found_dir=
 
320
          found_la=
 
321
          found_so=
 
322
          found_a=
 
323
          if test $use_additional = yes; then
 
324
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
325
              found_dir="$additional_libdir"
 
326
              found_so="$additional_libdir/lib$name.$shlibext"
 
327
              if test -f "$additional_libdir/lib$name.la"; then
 
328
                found_la="$additional_libdir/lib$name.la"
 
329
              fi
 
330
            else
 
331
              if test -f "$additional_libdir/lib$name.$libext"; then
 
332
                found_dir="$additional_libdir"
 
333
                found_a="$additional_libdir/lib$name.$libext"
 
334
                if test -f "$additional_libdir/lib$name.la"; then
 
335
                  found_la="$additional_libdir/lib$name.la"
 
336
                fi
 
337
              fi
 
338
            fi
 
339
          fi
 
340
          if test "X$found_dir" = "X"; then
 
341
            for x in $LDFLAGS $LTLIB[]NAME; do
 
342
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
343
              case "$x" in
 
344
                -L*)
 
345
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
346
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
347
                    found_dir="$dir"
 
348
                    found_so="$dir/lib$name.$shlibext"
 
349
                    if test -f "$dir/lib$name.la"; then
 
350
                      found_la="$dir/lib$name.la"
 
351
                    fi
 
352
                  else
 
353
                    if test -f "$dir/lib$name.$libext"; then
 
354
                      found_dir="$dir"
 
355
                      found_a="$dir/lib$name.$libext"
 
356
                      if test -f "$dir/lib$name.la"; then
 
357
                        found_la="$dir/lib$name.la"
 
358
                      fi
 
359
                    fi
 
360
                  fi
 
361
                  ;;
 
362
              esac
 
363
              if test "X$found_dir" != "X"; then
 
364
                break
 
365
              fi
 
366
            done
 
367
          fi
 
368
          if test "X$found_dir" != "X"; then
 
369
            dnl Found the library.
 
370
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
371
            if test "X$found_so" != "X"; then
 
372
              dnl Linking with a shared library. We attempt to hardcode its
 
373
              dnl directory into the executable's runpath, unless it's the
 
374
              dnl standard /usr/lib.
 
375
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
 
376
                dnl No hardcoding is needed.
 
377
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
378
              else
 
379
                dnl Use an explicit option to hardcode DIR into the resulting
 
380
                dnl binary.
 
381
                dnl Potentially add DIR to ltrpathdirs.
 
382
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
383
                haveit=
 
384
                for x in $ltrpathdirs; do
 
385
                  if test "X$x" = "X$found_dir"; then
 
386
                    haveit=yes
 
387
                    break
 
388
                  fi
 
389
                done
 
390
                if test -z "$haveit"; then
 
391
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
392
                fi
 
393
                dnl The hardcoding into $LIBNAME is system dependent.
 
394
                if test "$hardcode_direct" = yes; then
 
395
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
396
                  dnl resulting binary.
 
397
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
398
                else
 
399
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
400
                    dnl Use an explicit option to hardcode DIR into the resulting
 
401
                    dnl binary.
 
402
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
403
                    dnl Potentially add DIR to rpathdirs.
 
404
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
405
                    haveit=
 
406
                    for x in $rpathdirs; do
 
407
                      if test "X$x" = "X$found_dir"; then
 
408
                        haveit=yes
 
409
                        break
 
410
                      fi
 
411
                    done
 
412
                    if test -z "$haveit"; then
 
413
                      rpathdirs="$rpathdirs $found_dir"
 
414
                    fi
 
415
                  else
 
416
                    dnl Rely on "-L$found_dir".
 
417
                    dnl But don't add it if it's already contained in the LDFLAGS
 
418
                    dnl or the already constructed $LIBNAME
 
419
                    haveit=
 
420
                    for x in $LDFLAGS $LIB[]NAME; do
 
421
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
422
                      if test "X$x" = "X-L$found_dir"; then
 
423
                        haveit=yes
 
424
                        break
 
425
                      fi
 
426
                    done
 
427
                    if test -z "$haveit"; then
 
428
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
429
                    fi
 
430
                    if test "$hardcode_minus_L" != no; then
 
431
                      dnl FIXME: Not sure whether we should use
 
432
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
433
                      dnl here.
 
434
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
435
                    else
 
436
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
437
                      dnl here, because this doesn't fit in flags passed to the
 
438
                      dnl compiler. So give up. No hardcoding. This affects only
 
439
                      dnl very old systems.
 
440
                      dnl FIXME: Not sure whether we should use
 
441
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
442
                      dnl here.
 
443
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
444
                    fi
 
445
                  fi
 
446
                fi
 
447
              fi
 
448
            else
 
449
              if test "X$found_a" != "X"; then
 
450
                dnl Linking with a static library.
 
451
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
452
              else
 
453
                dnl We shouldn't come here, but anyway it's good to have a
 
454
                dnl fallback.
 
455
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
456
              fi
 
457
            fi
 
458
            dnl Assume the include files are nearby.
 
459
            additional_includedir=
 
460
            case "$found_dir" in
 
461
              */lib | */lib/)
 
462
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
463
                additional_includedir="$basedir/include"
 
464
                ;;
 
465
            esac
 
466
            if test "X$additional_includedir" != "X"; then
 
467
              dnl Potentially add $additional_includedir to $INCNAME.
 
468
              dnl But don't add it
 
469
              dnl   1. if it's the standard /usr/include,
 
470
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
471
              dnl   3. if it's already present in $CPPFLAGS or the already
 
472
              dnl      constructed $INCNAME,
 
473
              dnl   4. if it doesn't exist as a directory.
 
474
              if test "X$additional_includedir" != "X/usr/include"; then
 
475
                haveit=
 
476
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
477
                  if test -n "$GCC"; then
 
478
                    case $host_os in
 
479
                      linux*) haveit=yes;;
 
480
                    esac
 
481
                  fi
 
482
                fi
 
483
                if test -z "$haveit"; then
 
484
                  for x in $CPPFLAGS $INC[]NAME; do
 
485
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
486
                    if test "X$x" = "X-I$additional_includedir"; then
 
487
                      haveit=yes
 
488
                      break
 
489
                    fi
 
490
                  done
 
491
                  if test -z "$haveit"; then
 
492
                    if test -d "$additional_includedir"; then
 
493
                      dnl Really add $additional_includedir to $INCNAME.
 
494
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
495
                    fi
 
496
                  fi
 
497
                fi
 
498
              fi
 
499
            fi
 
500
            dnl Look for dependencies.
 
501
            if test -n "$found_la"; then
 
502
              dnl Read the .la file. It defines the variables
 
503
              dnl dlname, library_names, old_library, dependency_libs, current,
 
504
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
505
              save_libdir="$libdir"
 
506
              case "$found_la" in
 
507
                */* | *\\*) . "$found_la" ;;
 
508
                *) . "./$found_la" ;;
 
509
              esac
 
510
              libdir="$save_libdir"
 
511
              dnl We use only dependency_libs.
 
512
              for dep in $dependency_libs; do
 
513
                case "$dep" in
 
514
                  -L*)
 
515
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
516
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
517
                    dnl But don't add it
 
518
                    dnl   1. if it's the standard /usr/lib,
 
519
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
520
                    dnl   3. if it's already present in $LDFLAGS or the already
 
521
                    dnl      constructed $LIBNAME,
 
522
                    dnl   4. if it doesn't exist as a directory.
 
523
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
524
                      haveit=
 
525
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
526
                        if test -n "$GCC"; then
 
527
                          case $host_os in
 
528
                            linux*) haveit=yes;;
 
529
                          esac
 
530
                        fi
 
531
                      fi
 
532
                      if test -z "$haveit"; then
 
533
                        haveit=
 
534
                        for x in $LDFLAGS $LIB[]NAME; do
 
535
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
536
                          if test "X$x" = "X-L$additional_libdir"; then
 
537
                            haveit=yes
 
538
                            break
 
539
                          fi
 
540
                        done
 
541
                        if test -z "$haveit"; then
 
542
                          if test -d "$additional_libdir"; then
 
543
                            dnl Really add $additional_libdir to $LIBNAME.
 
544
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
545
                          fi
 
546
                        fi
 
547
                        haveit=
 
548
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
549
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
550
                          if test "X$x" = "X-L$additional_libdir"; then
 
551
                            haveit=yes
 
552
                            break
 
553
                          fi
 
554
                        done
 
555
                        if test -z "$haveit"; then
 
556
                          if test -d "$additional_libdir"; then
 
557
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
558
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
559
                          fi
 
560
                        fi
 
561
                      fi
 
562
                    fi
 
563
                    ;;
 
564
                  -R*)
 
565
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
566
                    if test "$enable_rpath" != no; then
 
567
                      dnl Potentially add DIR to rpathdirs.
 
568
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
569
                      haveit=
 
570
                      for x in $rpathdirs; do
 
571
                        if test "X$x" = "X$dir"; then
 
572
                          haveit=yes
 
573
                          break
 
574
                        fi
 
575
                      done
 
576
                      if test -z "$haveit"; then
 
577
                        rpathdirs="$rpathdirs $dir"
 
578
                      fi
 
579
                      dnl Potentially add DIR to ltrpathdirs.
 
580
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
581
                      haveit=
 
582
                      for x in $ltrpathdirs; do
 
583
                        if test "X$x" = "X$dir"; then
 
584
                          haveit=yes
 
585
                          break
 
586
                        fi
 
587
                      done
 
588
                      if test -z "$haveit"; then
 
589
                        ltrpathdirs="$ltrpathdirs $dir"
 
590
                      fi
 
591
                    fi
 
592
                    ;;
 
593
                  -l*)
 
594
                    dnl Handle this in the next round.
 
595
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
596
                    ;;
 
597
                  *.la)
 
598
                    dnl Handle this in the next round. Throw away the .la's
 
599
                    dnl directory; it is already contained in a preceding -L
 
600
                    dnl option.
 
601
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
602
                    ;;
 
603
                  *)
 
604
                    dnl Most likely an immediate library name.
 
605
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
606
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
607
                    ;;
 
608
                esac
 
609
              done
 
610
            fi
 
611
          else
 
612
            dnl Didn't find the library; assume it is in the system directories
 
613
            dnl known to the linker and runtime loader. (All the system
 
614
            dnl directories known to the linker should also be known to the
 
615
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
616
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
617
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
618
          fi
 
619
        fi
 
620
      fi
 
621
    done
 
622
  done
 
623
  if test "X$rpathdirs" != "X"; then
 
624
    if test -n "$hardcode_libdir_separator"; then
 
625
      dnl Weird platform: only the last -rpath option counts, the user must
 
626
      dnl pass all path elements in one option. We can arrange that for a
 
627
      dnl single library, but not when more than one $LIBNAMEs are used.
 
628
      alldirs=
 
629
      for found_dir in $rpathdirs; do
 
630
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
631
      done
 
632
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
633
      acl_save_libdir="$libdir"
 
634
      libdir="$alldirs"
 
635
      eval flag=\"$hardcode_libdir_flag_spec\"
 
636
      libdir="$acl_save_libdir"
 
637
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
638
    else
 
639
      dnl The -rpath options are cumulative.
 
640
      for found_dir in $rpathdirs; do
 
641
        acl_save_libdir="$libdir"
 
642
        libdir="$found_dir"
 
643
        eval flag=\"$hardcode_libdir_flag_spec\"
 
644
        libdir="$acl_save_libdir"
 
645
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
646
      done
 
647
    fi
 
648
  fi
 
649
  if test "X$ltrpathdirs" != "X"; then
 
650
    dnl When using libtool, the option that works for both libraries and
 
651
    dnl executables is -R. The -R options are cumulative.
 
652
    for found_dir in $ltrpathdirs; do
 
653
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
654
    done
 
655
  fi
 
656
])
 
657
 
 
658
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
659
dnl unless already present in VAR.
 
660
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
661
dnl contains two or three consecutive elements that belong together.
 
662
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
663
[
 
664
  for element in [$2]; do
 
665
    haveit=
 
666
    for x in $[$1]; do
 
667
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
668
      if test "X$x" = "X$element"; then
 
669
        haveit=yes
 
670
        break
 
671
      fi
 
672
    done
 
673
    if test -z "$haveit"; then
 
674
      [$1]="${[$1]}${[$1]:+ }$element"
 
675
    fi
 
676
  done
 
677
])
 
678
 
 
679
# lib-prefix.m4 serial 3 (gettext-0.13)
 
680
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
681
dnl This file is free software, distributed under the terms of the GNU
 
682
dnl General Public License.  As a special exception to the GNU General
 
683
dnl Public License, this file may be distributed as part of a program
 
684
dnl that contains a configuration script generated by Autoconf, under
 
685
dnl the same distribution terms as the rest of that program.
 
686
 
 
687
dnl From Bruno Haible.
 
688
 
 
689
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
690
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
691
dnl require excessive bracketing.
 
692
ifdef([AC_HELP_STRING],
 
693
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
694
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
695
 
 
696
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
697
dnl to access previously installed libraries. The basic assumption is that
 
698
dnl a user will want packages to use other packages he previously installed
 
699
dnl with the same --prefix option.
 
700
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
701
dnl libraries, but is otherwise very convenient.
 
702
AC_DEFUN([AC_LIB_PREFIX],
 
703
[
 
704
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
705
  AC_REQUIRE([AC_PROG_CC])
 
706
  AC_REQUIRE([AC_CANONICAL_HOST])
 
707
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
708
  dnl By default, look in $includedir and $libdir.
 
709
  use_additional=yes
 
710
  AC_LIB_WITH_FINAL_PREFIX([
 
711
    eval additional_includedir=\"$includedir\"
 
712
    eval additional_libdir=\"$libdir\"
 
713
  ])
 
714
  AC_LIB_ARG_WITH([lib-prefix],
 
715
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
716
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
717
[
 
718
    if test "X$withval" = "Xno"; then
 
719
      use_additional=no
 
720
    else
 
721
      if test "X$withval" = "X"; then
 
722
        AC_LIB_WITH_FINAL_PREFIX([
 
723
          eval additional_includedir=\"$includedir\"
 
724
          eval additional_libdir=\"$libdir\"
 
725
        ])
 
726
      else
 
727
        additional_includedir="$withval/include"
 
728
        additional_libdir="$withval/lib"
 
729
      fi
 
730
    fi
 
731
])
 
732
  if test $use_additional = yes; then
 
733
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
734
    dnl But don't add it
 
735
    dnl   1. if it's the standard /usr/include,
 
736
    dnl   2. if it's already present in $CPPFLAGS,
 
737
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
738
    dnl   4. if it doesn't exist as a directory.
 
739
    if test "X$additional_includedir" != "X/usr/include"; then
 
740
      haveit=
 
741
      for x in $CPPFLAGS; do
 
742
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
743
        if test "X$x" = "X-I$additional_includedir"; then
 
744
          haveit=yes
 
745
          break
 
746
        fi
 
747
      done
 
748
      if test -z "$haveit"; then
 
749
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
750
          if test -n "$GCC"; then
 
751
            case $host_os in
 
752
              linux*) haveit=yes;;
 
753
            esac
 
754
          fi
 
755
        fi
 
756
        if test -z "$haveit"; then
 
757
          if test -d "$additional_includedir"; then
 
758
            dnl Really add $additional_includedir to $CPPFLAGS.
 
759
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
760
          fi
 
761
        fi
 
762
      fi
 
763
    fi
 
764
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
765
    dnl But don't add it
 
766
    dnl   1. if it's the standard /usr/lib,
 
767
    dnl   2. if it's already present in $LDFLAGS,
 
768
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
769
    dnl   4. if it doesn't exist as a directory.
 
770
    if test "X$additional_libdir" != "X/usr/lib"; then
 
771
      haveit=
 
772
      for x in $LDFLAGS; do
 
773
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
774
        if test "X$x" = "X-L$additional_libdir"; then
 
775
          haveit=yes
 
776
          break
 
777
        fi
 
778
      done
 
779
      if test -z "$haveit"; then
 
780
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
781
          if test -n "$GCC"; then
 
782
            case $host_os in
 
783
              linux*) haveit=yes;;
 
784
            esac
 
785
          fi
 
786
        fi
 
787
        if test -z "$haveit"; then
 
788
          if test -d "$additional_libdir"; then
 
789
            dnl Really add $additional_libdir to $LDFLAGS.
 
790
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
791
          fi
 
792
        fi
 
793
      fi
 
794
    fi
 
795
  fi
 
796
])
 
797
 
 
798
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
799
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
800
dnl $exec_prefix will expand at the end of the configure script.
 
801
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
802
[
 
803
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
804
  dnl at the end of configure.
 
805
  if test "X$prefix" = "XNONE"; then
 
806
    acl_final_prefix="$ac_default_prefix"
 
807
  else
 
808
    acl_final_prefix="$prefix"
 
809
  fi
 
810
  if test "X$exec_prefix" = "XNONE"; then
 
811
    acl_final_exec_prefix='${prefix}'
 
812
  else
 
813
    acl_final_exec_prefix="$exec_prefix"
 
814
  fi
 
815
  acl_save_prefix="$prefix"
 
816
  prefix="$acl_final_prefix"
 
817
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
818
  prefix="$acl_save_prefix"
 
819
])
 
820
 
 
821
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
822
dnl variables prefix and exec_prefix bound to the values they will have
 
823
dnl at the end of the configure script.
 
824
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
825
[
 
826
  acl_save_prefix="$prefix"
 
827
  prefix="$acl_final_prefix"
 
828
  acl_save_exec_prefix="$exec_prefix"
 
829
  exec_prefix="$acl_final_exec_prefix"
 
830
  $1
 
831
  exec_prefix="$acl_save_exec_prefix"
 
832
  prefix="$acl_save_prefix"
 
833
])
 
834
 
 
835
#                                                        -*- Autoconf -*-
 
836
# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 
837
# Generated from amversion.in; do not edit by hand.
1638
838
 
1639
839
# This program is free software; you can redistribute it and/or modify
1640
840
# it under the terms of the GNU General Public License as published by
1654
854
# ----------------------------
1655
855
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1656
856
# generated from the m4 files accompanying Automake X.Y.
1657
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
 
857
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
1658
858
 
1659
859
# AM_SET_CURRENT_AUTOMAKE_VERSION
1660
860
# -------------------------------
1661
861
# Call AM_AUTOMAKE_VERSION so it can be traced.
1662
862
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1663
863
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1664
 
         [AM_AUTOMAKE_VERSION([1.7.9])])
1665
 
 
1666
 
# Helper functions for option handling.                    -*- Autoconf -*-
1667
 
 
1668
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
1669
 
 
1670
 
# This program is free software; you can redistribute it and/or modify
1671
 
# it under the terms of the GNU General Public License as published by
1672
 
# the Free Software Foundation; either version 2, or (at your option)
1673
 
# any later version.
1674
 
 
1675
 
# This program is distributed in the hope that it will be useful,
1676
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1677
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1678
 
# GNU General Public License for more details.
1679
 
 
1680
 
# You should have received a copy of the GNU General Public License
1681
 
# along with this program; if not, write to the Free Software
1682
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1683
 
# 02111-1307, USA.
1684
 
 
1685
 
# serial 2
1686
 
 
1687
 
# _AM_MANGLE_OPTION(NAME)
1688
 
# -----------------------
1689
 
AC_DEFUN([_AM_MANGLE_OPTION],
1690
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1691
 
 
1692
 
# _AM_SET_OPTION(NAME)
1693
 
# ------------------------------
1694
 
# Set option NAME.  Presently that only means defining a flag for this option.
1695
 
AC_DEFUN([_AM_SET_OPTION],
1696
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1697
 
 
1698
 
# _AM_SET_OPTIONS(OPTIONS)
1699
 
# ----------------------------------
1700
 
# OPTIONS is a space-separated list of Automake options.
1701
 
AC_DEFUN([_AM_SET_OPTIONS],
1702
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1703
 
 
1704
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1705
 
# -------------------------------------------
1706
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1707
 
AC_DEFUN([_AM_IF_OPTION],
1708
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1709
 
 
1710
 
#
1711
 
# Check to make sure that the build environment is sane.
1712
 
#
1713
 
 
1714
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1715
 
 
1716
 
# This program is free software; you can redistribute it and/or modify
1717
 
# it under the terms of the GNU General Public License as published by
1718
 
# the Free Software Foundation; either version 2, or (at your option)
1719
 
# any later version.
1720
 
 
1721
 
# This program is distributed in the hope that it will be useful,
1722
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1723
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1724
 
# GNU General Public License for more details.
1725
 
 
1726
 
# You should have received a copy of the GNU General Public License
1727
 
# along with this program; if not, write to the Free Software
1728
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1729
 
# 02111-1307, USA.
1730
 
 
1731
 
# serial 3
1732
 
 
1733
 
# AM_SANITY_CHECK
1734
 
# ---------------
1735
 
AC_DEFUN([AM_SANITY_CHECK],
1736
 
[AC_MSG_CHECKING([whether build environment is sane])
1737
 
# Just in case
1738
 
sleep 1
1739
 
echo timestamp > conftest.file
1740
 
# Do `set' in a subshell so we don't clobber the current shell's
1741
 
# arguments.  Must try -L first in case configure is actually a
1742
 
# symlink; some systems play weird games with the mod time of symlinks
1743
 
# (eg FreeBSD returns the mod time of the symlink's containing
1744
 
# directory).
1745
 
if (
1746
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1747
 
   if test "$[*]" = "X"; then
1748
 
      # -L didn't work.
1749
 
      set X `ls -t $srcdir/configure conftest.file`
1750
 
   fi
1751
 
   rm -f conftest.file
1752
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
1753
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
1754
 
 
1755
 
      # If neither matched, then we have a broken ls.  This can happen
1756
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
1757
 
      # broken ls alias from the environment.  This has actually
1758
 
      # happened.  Such a system could not be considered "sane".
1759
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1760
 
alias in your environment])
1761
 
   fi
1762
 
 
1763
 
   test "$[2]" = conftest.file
1764
 
   )
1765
 
then
1766
 
   # Ok.
1767
 
   :
1768
 
else
1769
 
   AC_MSG_ERROR([newly created file is older than distributed files!
1770
 
Check your system clock])
1771
 
fi
1772
 
AC_MSG_RESULT(yes)])
1773
 
 
1774
 
#  -*- Autoconf -*-
1775
 
 
1776
 
 
1777
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
1778
 
 
1779
 
# This program is free software; you can redistribute it and/or modify
1780
 
# it under the terms of the GNU General Public License as published by
1781
 
# the Free Software Foundation; either version 2, or (at your option)
1782
 
# any later version.
1783
 
 
1784
 
# This program is distributed in the hope that it will be useful,
1785
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1786
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1787
 
# GNU General Public License for more details.
1788
 
 
1789
 
# You should have received a copy of the GNU General Public License
1790
 
# along with this program; if not, write to the Free Software
1791
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1792
 
# 02111-1307, USA.
1793
 
 
1794
 
# serial 3
1795
 
 
1796
 
# AM_MISSING_PROG(NAME, PROGRAM)
1797
 
# ------------------------------
1798
 
AC_DEFUN([AM_MISSING_PROG],
1799
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1800
 
$1=${$1-"${am_missing_run}$2"}
1801
 
AC_SUBST($1)])
1802
 
 
1803
 
 
1804
 
# AM_MISSING_HAS_RUN
1805
 
# ------------------
1806
 
# Define MISSING if not defined so far and test if it supports --run.
1807
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
1808
 
AC_DEFUN([AM_MISSING_HAS_RUN],
1809
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1810
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1811
 
# Use eval to expand $SHELL
1812
 
if eval "$MISSING --run true"; then
1813
 
  am_missing_run="$MISSING --run "
1814
 
else
1815
 
  am_missing_run=
1816
 
  AC_MSG_WARN([`missing' script is too old or missing])
1817
 
fi
1818
 
])
 
864
         [AM_AUTOMAKE_VERSION([1.9.4])])
1819
865
 
1820
866
# AM_AUX_DIR_EXPAND
1821
867
 
1822
 
# Copyright 2001 Free Software Foundation, Inc.
 
868
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1823
869
 
1824
870
# This program is free software; you can redistribute it and/or modify
1825
871
# it under the terms of the GNU General Public License as published by
1874
920
# absolute PATH.  The drawback is that using absolute paths prevent a
1875
921
# configured tree to be moved without reconfiguration.
1876
922
 
1877
 
# Rely on autoconf to set up CDPATH properly.
1878
 
AC_PREREQ([2.50])
1879
 
 
1880
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
923
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
924
[dnl Rely on autoconf to set up CDPATH properly.
 
925
AC_PREREQ([2.50])dnl
1881
926
# expand $ac_aux_dir to an absolute path
1882
927
am_aux_dir=`cd $ac_aux_dir && pwd`
1883
928
])
1884
929
 
1885
 
# AM_PROG_INSTALL_SH
1886
 
# ------------------
1887
 
# Define $install_sh.
1888
 
 
1889
 
# Copyright 2001 Free Software Foundation, Inc.
1890
 
 
1891
 
# This program is free software; you can redistribute it and/or modify
1892
 
# it under the terms of the GNU General Public License as published by
1893
 
# the Free Software Foundation; either version 2, or (at your option)
1894
 
# any later version.
1895
 
 
1896
 
# This program is distributed in the hope that it will be useful,
1897
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1898
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1899
 
# GNU General Public License for more details.
1900
 
 
1901
 
# You should have received a copy of the GNU General Public License
1902
 
# along with this program; if not, write to the Free Software
1903
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1904
 
# 02111-1307, USA.
1905
 
 
1906
 
AC_DEFUN([AM_PROG_INSTALL_SH],
1907
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1908
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
1909
 
AC_SUBST(install_sh)])
1910
 
 
1911
 
# AM_PROG_INSTALL_STRIP
1912
 
 
1913
 
# Copyright 2001 Free Software Foundation, Inc.
1914
 
 
1915
 
# This program is free software; you can redistribute it and/or modify
1916
 
# it under the terms of the GNU General Public License as published by
1917
 
# the Free Software Foundation; either version 2, or (at your option)
1918
 
# any later version.
1919
 
 
1920
 
# This program is distributed in the hope that it will be useful,
1921
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1922
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1923
 
# GNU General Public License for more details.
1924
 
 
1925
 
# You should have received a copy of the GNU General Public License
1926
 
# along with this program; if not, write to the Free Software
1927
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1928
 
# 02111-1307, USA.
1929
 
 
1930
 
# One issue with vendor `install' (even GNU) is that you can't
1931
 
# specify the program used to strip binaries.  This is especially
1932
 
# annoying in cross-compiling environments, where the build's strip
1933
 
# is unlikely to handle the host's binaries.
1934
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
1935
 
# always use install-sh in `make install-strip', and initialize
1936
 
# STRIPPROG with the value of the STRIP variable (set by the user).
1937
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1938
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1939
 
# Installed binaries are usually stripped using `strip' when the user
1940
 
# run `make install-strip'.  However `strip' might not be the right
1941
 
# tool to use in cross-compilation environments, therefore Automake
1942
 
# will honor the `STRIP' environment variable to overrule this program.
1943
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1944
 
if test "$cross_compiling" != no; then
1945
 
  AC_CHECK_TOOL([STRIP], [strip], :)
1946
 
fi
1947
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1948
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1949
 
 
1950
 
#                                                          -*- Autoconf -*-
1951
 
# Copyright (C) 2003  Free Software Foundation, Inc.
1952
 
 
1953
 
# This program is free software; you can redistribute it and/or modify
1954
 
# it under the terms of the GNU General Public License as published by
1955
 
# the Free Software Foundation; either version 2, or (at your option)
1956
 
# any later version.
1957
 
 
1958
 
# This program is distributed in the hope that it will be useful,
1959
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1960
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1961
 
# GNU General Public License for more details.
1962
 
 
1963
 
# You should have received a copy of the GNU General Public License
1964
 
# along with this program; if not, write to the Free Software
1965
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1966
 
# 02111-1307, USA.
1967
 
 
1968
 
# serial 1
1969
 
 
1970
 
# Check whether the underlying file-system supports filenames
1971
 
# with a leading dot.  For instance MS-DOS doesn't.
1972
 
AC_DEFUN([AM_SET_LEADING_DOT],
1973
 
[rm -rf .tst 2>/dev/null
1974
 
mkdir .tst 2>/dev/null
1975
 
if test -d .tst; then
1976
 
  am__leading_dot=.
 
930
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
931
 
 
932
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
933
 
 
934
# This program is free software; you can redistribute it and/or modify
 
935
# it under the terms of the GNU General Public License as published by
 
936
# the Free Software Foundation; either version 2, or (at your option)
 
937
# any later version.
 
938
 
 
939
# This program is distributed in the hope that it will be useful,
 
940
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
941
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
942
# GNU General Public License for more details.
 
943
 
 
944
# You should have received a copy of the GNU General Public License
 
945
# along with this program; if not, write to the Free Software
 
946
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
947
# 02111-1307, USA.
 
948
 
 
949
# serial 6
 
950
 
 
951
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
952
# -------------------------------------
 
953
# Define a conditional.
 
954
AC_DEFUN([AM_CONDITIONAL],
 
955
[AC_PREREQ(2.52)dnl
 
956
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
957
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
958
AC_SUBST([$1_TRUE])
 
959
AC_SUBST([$1_FALSE])
 
960
if $2; then
 
961
  $1_TRUE=
 
962
  $1_FALSE='#'
1977
963
else
1978
 
  am__leading_dot=_
 
964
  $1_TRUE='#'
 
965
  $1_FALSE=
1979
966
fi
1980
 
rmdir .tst 2>/dev/null
1981
 
AC_SUBST([am__leading_dot])])
1982
 
 
1983
 
# serial 5                                              -*- Autoconf -*-
1984
 
 
1985
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
967
AC_CONFIG_COMMANDS_PRE(
 
968
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
969
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
970
Usually this means the macro was only invoked conditionally.]])
 
971
fi])])
 
972
 
 
973
# serial 7                                              -*- Autoconf -*-
 
974
 
 
975
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 
976
# Free Software Foundation, Inc.
1986
977
 
1987
978
# This program is free software; you can redistribute it and/or modify
1988
979
# it under the terms of the GNU General Public License as published by
2066
1057
    : > sub/conftest.c
2067
1058
    for i in 1 2 3 4 5 6; do
2068
1059
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2069
 
      : > sub/conftst$i.h
 
1060
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
1061
      # Solaris 8's {/usr,}/bin/sh.
 
1062
      touch sub/conftst$i.h
2070
1063
    done
2071
1064
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2072
1065
 
2094
1087
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2095
1088
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2096
1089
      # icc doesn't choke on unknown options, it will just issue warnings
2097
 
      # (even with -Werror).  So we grep stderr for any message
2098
 
      # that says an option was ignored.
2099
 
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
 
1090
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1091
      # that says an option was ignored or not supported.
 
1092
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1093
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1094
      # The diagnosis changed in icc 8.0:
 
1095
      #   icc: Command line remark: option '-MP' not supported
 
1096
      if (grep 'ignoring option' conftest.err ||
 
1097
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2100
1098
        am_cv_$1_dependencies_compiler_type=$depmode
2101
1099
        break
2102
1100
      fi
2130
1128
# ------------
2131
1129
AC_DEFUN([AM_DEP_TRACK],
2132
1130
[AC_ARG_ENABLE(dependency-tracking,
2133
 
[  --disable-dependency-tracking Speeds up one-time builds
2134
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
1131
[  --disable-dependency-tracking  speeds up one-time build
 
1132
  --enable-dependency-tracking   do not reject slow dependency extractors])
2135
1133
if test "x$enable_dependency_tracking" != xno; then
2136
1134
  am_depcomp="$ac_aux_dir/depcomp"
2137
1135
  AMDEPBACKSLASH='\'
2142
1140
 
2143
1141
# Generate code to set up dependency tracking.   -*- Autoconf -*-
2144
1142
 
2145
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
1143
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 
1144
#   Free Software Foundation, Inc.
2146
1145
 
2147
1146
# This program is free software; you can redistribute it and/or modify
2148
1147
# it under the terms of the GNU General Public License as published by
2178
1177
  else
2179
1178
    continue
2180
1179
  fi
2181
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
2182
 
  # Extract the definition of DEP_FILES from the Makefile without
2183
 
  # running `make'.
2184
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
1180
  # Extract the definition of DEPDIR, am__include, and am__quote
 
1181
  # from the Makefile without running `make'.
 
1182
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
2185
1183
  test -z "$DEPDIR" && continue
 
1184
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1185
  test -z "am__include" && continue
 
1186
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
2186
1187
  # When using ansi2knr, U may be empty or an underscore; expand it
2187
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
2188
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
2189
 
  # We invoke sed twice because it is the simplest approach to
2190
 
  # changing $(DEPDIR) to its actual value in the expansion.
2191
 
  for file in `sed -n -e '
2192
 
    /^DEP_FILES = .*\\\\$/ {
2193
 
      s/^DEP_FILES = //
2194
 
      :loop
2195
 
        s/\\\\$//
2196
 
        p
2197
 
        n
2198
 
        /\\\\$/ b loop
2199
 
      p
2200
 
    }
2201
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
1188
  U=`sed -n 's/^U = //p' < "$mf"`
 
1189
  # Find all dependency output files, they are included files with
 
1190
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1191
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
1192
  # expansion.
 
1193
  for file in `sed -n "
 
1194
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
2202
1195
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2203
1196
    # Make sure the directory exists.
2204
1197
    test -f "$dirpart/$file" && continue
2224
1217
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2225
1218
])
2226
1219
 
 
1220
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
1221
 
 
1222
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
 
1223
 
 
1224
# This program is free software; you can redistribute it and/or modify
 
1225
# it under the terms of the GNU General Public License as published by
 
1226
# the Free Software Foundation; either version 2, or (at your option)
 
1227
# any later version.
 
1228
 
 
1229
# This program is distributed in the hope that it will be useful,
 
1230
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1231
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1232
# GNU General Public License for more details.
 
1233
 
 
1234
# You should have received a copy of the GNU General Public License
 
1235
# along with this program; if not, write to the Free Software
 
1236
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1237
# 02111-1307, USA.
 
1238
 
 
1239
# serial 7
 
1240
 
 
1241
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
1242
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
1243
 
 
1244
# Do all the work for Automake.                            -*- Autoconf -*-
 
1245
 
 
1246
# This macro actually does too much some checks are only needed if
 
1247
# your package does certain things.  But this isn't really a big deal.
 
1248
 
 
1249
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 
1250
# Free Software Foundation, Inc.
 
1251
 
 
1252
# This program is free software; you can redistribute it and/or modify
 
1253
# it under the terms of the GNU General Public License as published by
 
1254
# the Free Software Foundation; either version 2, or (at your option)
 
1255
# any later version.
 
1256
 
 
1257
# This program is distributed in the hope that it will be useful,
 
1258
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1259
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1260
# GNU General Public License for more details.
 
1261
 
 
1262
# You should have received a copy of the GNU General Public License
 
1263
# along with this program; if not, write to the Free Software
 
1264
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1265
# 02111-1307, USA.
 
1266
 
 
1267
# serial 11
 
1268
 
 
1269
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1270
# AM_INIT_AUTOMAKE([OPTIONS])
 
1271
# -----------------------------------------------
 
1272
# The call with PACKAGE and VERSION arguments is the old style
 
1273
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1274
# and VERSION should now be passed to AC_INIT and removed from
 
1275
# the call to AM_INIT_AUTOMAKE.
 
1276
# We support both call styles for the transition.  After
 
1277
# the next Automake release, Autoconf can make the AC_INIT
 
1278
# arguments mandatory, and then we can depend on a new Autoconf
 
1279
# release and drop the old call support.
 
1280
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1281
[AC_PREREQ([2.58])dnl
 
1282
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1283
dnl the ones we care about.
 
1284
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1285
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1286
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1287
# test to see if srcdir already configured
 
1288
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
1289
   test -f $srcdir/config.status; then
 
1290
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1291
fi
 
1292
 
 
1293
# test whether we have cygpath
 
1294
if test -z "$CYGPATH_W"; then
 
1295
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1296
    CYGPATH_W='cygpath -w'
 
1297
  else
 
1298
    CYGPATH_W=echo
 
1299
  fi
 
1300
fi
 
1301
AC_SUBST([CYGPATH_W])
 
1302
 
 
1303
# Define the identity of the package.
 
1304
dnl Distinguish between old-style and new-style calls.
 
1305
m4_ifval([$2],
 
1306
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1307
 AC_SUBST([PACKAGE], [$1])dnl
 
1308
 AC_SUBST([VERSION], [$2])],
 
1309
[_AM_SET_OPTIONS([$1])dnl
 
1310
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1311
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1312
 
 
1313
_AM_IF_OPTION([no-define],,
 
1314
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
1315
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
1316
 
 
1317
# Some tools Automake needs.
 
1318
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1319
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1320
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
1321
AM_MISSING_PROG(AUTOCONF, autoconf)
 
1322
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
1323
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
1324
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
1325
AM_PROG_INSTALL_SH
 
1326
AM_PROG_INSTALL_STRIP
 
1327
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
1328
# We need awk for the "check" target.  The system "awk" is bad on
 
1329
# some platforms.
 
1330
AC_REQUIRE([AC_PROG_AWK])dnl
 
1331
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1332
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1333
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1334
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1335
                             [_AM_PROG_TAR([v7])])])
 
1336
_AM_IF_OPTION([no-dependencies],,
 
1337
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1338
                  [_AM_DEPENDENCIES(CC)],
 
1339
                  [define([AC_PROG_CC],
 
1340
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
1341
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1342
                  [_AM_DEPENDENCIES(CXX)],
 
1343
                  [define([AC_PROG_CXX],
 
1344
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1345
])
 
1346
])
 
1347
 
 
1348
 
 
1349
# When config.status generates a header, we must update the stamp-h file.
 
1350
# This file resides in the same directory as the config header
 
1351
# that is generated.  The stamp files are numbered to have different names.
 
1352
 
 
1353
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1354
# loop where config.status creates the headers, so we can generate
 
1355
# our stamp files there.
 
1356
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1357
[# Compute $1's index in $config_headers.
 
1358
_am_stamp_count=1
 
1359
for _am_header in $config_headers :; do
 
1360
  case $_am_header in
 
1361
    $1 | $1:* )
 
1362
      break ;;
 
1363
    * )
 
1364
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1365
  esac
 
1366
done
 
1367
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
1368
 
 
1369
# AM_PROG_INSTALL_SH
 
1370
# ------------------
 
1371
# Define $install_sh.
 
1372
 
 
1373
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
1374
 
 
1375
# This program is free software; you can redistribute it and/or modify
 
1376
# it under the terms of the GNU General Public License as published by
 
1377
# the Free Software Foundation; either version 2, or (at your option)
 
1378
# any later version.
 
1379
 
 
1380
# This program is distributed in the hope that it will be useful,
 
1381
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1382
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1383
# GNU General Public License for more details.
 
1384
 
 
1385
# You should have received a copy of the GNU General Public License
 
1386
# along with this program; if not, write to the Free Software
 
1387
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1388
# 02111-1307, USA.
 
1389
 
 
1390
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1391
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1392
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
1393
AC_SUBST(install_sh)])
 
1394
 
 
1395
#                                                          -*- Autoconf -*-
 
1396
# Copyright (C) 2003  Free Software Foundation, Inc.
 
1397
 
 
1398
# This program is free software; you can redistribute it and/or modify
 
1399
# it under the terms of the GNU General Public License as published by
 
1400
# the Free Software Foundation; either version 2, or (at your option)
 
1401
# any later version.
 
1402
 
 
1403
# This program is distributed in the hope that it will be useful,
 
1404
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1405
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1406
# GNU General Public License for more details.
 
1407
 
 
1408
# You should have received a copy of the GNU General Public License
 
1409
# along with this program; if not, write to the Free Software
 
1410
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1411
# 02111-1307, USA.
 
1412
 
 
1413
# serial 1
 
1414
 
 
1415
# Check whether the underlying file-system supports filenames
 
1416
# with a leading dot.  For instance MS-DOS doesn't.
 
1417
AC_DEFUN([AM_SET_LEADING_DOT],
 
1418
[rm -rf .tst 2>/dev/null
 
1419
mkdir .tst 2>/dev/null
 
1420
if test -d .tst; then
 
1421
  am__leading_dot=.
 
1422
else
 
1423
  am__leading_dot=_
 
1424
fi
 
1425
rmdir .tst 2>/dev/null
 
1426
AC_SUBST([am__leading_dot])])
 
1427
 
 
1428
# Add --enable-maintainer-mode option to configure.
 
1429
# From Jim Meyering
 
1430
 
 
1431
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
 
1432
# Free Software Foundation, Inc.
 
1433
 
 
1434
# This program is free software; you can redistribute it and/or modify
 
1435
# it under the terms of the GNU General Public License as published by
 
1436
# the Free Software Foundation; either version 2, or (at your option)
 
1437
# any later version.
 
1438
 
 
1439
# This program is distributed in the hope that it will be useful,
 
1440
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1441
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1442
# GNU General Public License for more details.
 
1443
 
 
1444
# You should have received a copy of the GNU General Public License
 
1445
# along with this program; if not, write to the Free Software
 
1446
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1447
# 02111-1307, USA.
 
1448
 
 
1449
# serial 3
 
1450
 
 
1451
AC_DEFUN([AM_MAINTAINER_MODE],
 
1452
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
1453
  dnl maintainer-mode is disabled by default
 
1454
  AC_ARG_ENABLE(maintainer-mode,
 
1455
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
1456
                          (and sometimes confusing) to the casual installer],
 
1457
      USE_MAINTAINER_MODE=$enableval,
 
1458
      USE_MAINTAINER_MODE=no)
 
1459
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
1460
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
1461
  MAINT=$MAINTAINER_MODE_TRUE
 
1462
  AC_SUBST(MAINT)dnl
 
1463
]
 
1464
)
 
1465
 
 
1466
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
1467
 
2227
1468
# Check to see how 'make' treats includes.      -*- Autoconf -*-
2228
1469
 
2229
1470
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2287
1528
rm -f confinc confmf
2288
1529
])
2289
1530
 
2290
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
2291
 
 
2292
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
2293
 
 
2294
 
# This program is free software; you can redistribute it and/or modify
2295
 
# it under the terms of the GNU General Public License as published by
2296
 
# the Free Software Foundation; either version 2, or (at your option)
2297
 
# any later version.
2298
 
 
2299
 
# This program is distributed in the hope that it will be useful,
2300
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2301
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2302
 
# GNU General Public License for more details.
2303
 
 
2304
 
# You should have received a copy of the GNU General Public License
2305
 
# along with this program; if not, write to the Free Software
2306
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2307
 
# 02111-1307, USA.
2308
 
 
2309
 
# serial 5
2310
 
 
2311
 
AC_PREREQ(2.52)
2312
 
 
2313
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
2314
 
# -------------------------------------
2315
 
# Define a conditional.
2316
 
AC_DEFUN([AM_CONDITIONAL],
2317
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
2318
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2319
 
AC_SUBST([$1_TRUE])
2320
 
AC_SUBST([$1_FALSE])
2321
 
if $2; then
2322
 
  $1_TRUE=
2323
 
  $1_FALSE='#'
2324
 
else
2325
 
  $1_TRUE='#'
2326
 
  $1_FALSE=
2327
 
fi
2328
 
AC_CONFIG_COMMANDS_PRE(
2329
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2330
 
  AC_MSG_ERROR([conditional "$1" was never defined.
2331
 
Usually this means the macro was only invoked conditionally.])
2332
 
fi])])
2333
 
 
2334
 
# Add --enable-maintainer-mode option to configure.
2335
 
# From Jim Meyering
2336
 
 
2337
 
# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
 
1531
#  -*- Autoconf -*-
 
1532
 
 
1533
 
 
1534
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
1535
 
 
1536
# This program is free software; you can redistribute it and/or modify
 
1537
# it under the terms of the GNU General Public License as published by
 
1538
# the Free Software Foundation; either version 2, or (at your option)
 
1539
# any later version.
 
1540
 
 
1541
# This program is distributed in the hope that it will be useful,
 
1542
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1543
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1544
# GNU General Public License for more details.
 
1545
 
 
1546
# You should have received a copy of the GNU General Public License
 
1547
# along with this program; if not, write to the Free Software
 
1548
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1549
# 02111-1307, USA.
 
1550
 
 
1551
# serial 3
 
1552
 
 
1553
# AM_MISSING_PROG(NAME, PROGRAM)
 
1554
# ------------------------------
 
1555
AC_DEFUN([AM_MISSING_PROG],
 
1556
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1557
$1=${$1-"${am_missing_run}$2"}
 
1558
AC_SUBST($1)])
 
1559
 
 
1560
 
 
1561
# AM_MISSING_HAS_RUN
 
1562
# ------------------
 
1563
# Define MISSING if not defined so far and test if it supports --run.
 
1564
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
1565
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1566
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1567
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
1568
# Use eval to expand $SHELL
 
1569
if eval "$MISSING --run true"; then
 
1570
  am_missing_run="$MISSING --run "
 
1571
else
 
1572
  am_missing_run=
 
1573
  AC_MSG_WARN([`missing' script is too old or missing])
 
1574
fi
 
1575
])
 
1576
 
 
1577
# AM_PROG_MKDIR_P
 
1578
# ---------------
 
1579
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
1580
 
 
1581
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 
1582
 
 
1583
# This program is free software; you can redistribute it and/or modify
 
1584
# it under the terms of the GNU General Public License as published by
 
1585
# the Free Software Foundation; either version 2, or (at your option)
 
1586
# any later version.
 
1587
 
 
1588
# This program is distributed in the hope that it will be useful,
 
1589
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1590
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1591
# GNU General Public License for more details.
 
1592
 
 
1593
# You should have received a copy of the GNU General Public License
 
1594
# along with this program; if not, write to the Free Software
 
1595
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1596
# 02111-1307, USA.
 
1597
 
 
1598
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
1599
# created by `make install' are always world readable, even if the
 
1600
# installer happens to have an overly restrictive umask (e.g. 077).
 
1601
# This was a mistake.  There are at least two reasons why we must not
 
1602
# use `-m 0755':
 
1603
#   - it causes special bits like SGID to be ignored,
 
1604
#   - it may be too restrictive (some setups expect 775 directories).
 
1605
#
 
1606
# Do not use -m 0755 and let people choose whatever they expect by
 
1607
# setting umask.
 
1608
#
 
1609
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
1610
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
1611
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
1612
# concurrently, both version can detect that a/ is missing, but only
 
1613
# one can create it and the other will error out.  Consequently we
 
1614
# restrict ourselves to GNU make (using the --version option ensures
 
1615
# this.)
 
1616
AC_DEFUN([AM_PROG_MKDIR_P],
 
1617
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
1618
  # We used to keeping the `.' as first argument, in order to
 
1619
  # allow $(mkdir_p) to be used without argument.  As in
 
1620
  #   $(mkdir_p) $(somedir)
 
1621
  # where $(somedir) is conditionally defined.  However this is wrong
 
1622
  # for two reasons:
 
1623
  #  1. if the package is installed by a user who cannot write `.'
 
1624
  #     make install will fail,
 
1625
  #  2. the above comment should most certainly read
 
1626
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
1627
  #     so it does not work when $(somedir) is undefined and
 
1628
  #     $(DESTDIR) is not.
 
1629
  #  To support the latter case, we have to write
 
1630
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
1631
  #  so the `.' trick is pointless.
 
1632
  mkdir_p='mkdir -p --'
 
1633
else
 
1634
  # On NextStep and OpenStep, the `mkdir' command does not
 
1635
  # recognize any option.  It will interpret all options as
 
1636
  # directories to create, and then abort because `.' already
 
1637
  # exists.
 
1638
  for d in ./-p ./--version;
 
1639
  do
 
1640
    test -d $d && rmdir $d
 
1641
  done
 
1642
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
1643
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
1644
    mkdir_p='$(mkinstalldirs)'
 
1645
  else
 
1646
    mkdir_p='$(install_sh) -d'
 
1647
  fi
 
1648
fi
 
1649
AC_SUBST([mkdir_p])])
 
1650
 
 
1651
# Helper functions for option handling.                    -*- Autoconf -*-
 
1652
 
 
1653
# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
2338
1654
 
2339
1655
# This program is free software; you can redistribute it and/or modify
2340
1656
# it under the terms of the GNU General Public License as published by
2353
1669
 
2354
1670
# serial 2
2355
1671
 
2356
 
AC_DEFUN([AM_MAINTAINER_MODE],
2357
 
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2358
 
  dnl maintainer-mode is disabled by default
2359
 
  AC_ARG_ENABLE(maintainer-mode,
2360
 
[  --enable-maintainer-mode enable make rules and dependencies not useful
2361
 
                          (and sometimes confusing) to the casual installer],
2362
 
      USE_MAINTAINER_MODE=$enableval,
2363
 
      USE_MAINTAINER_MODE=no)
2364
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2365
 
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
2366
 
  MAINT=$MAINTAINER_MODE_TRUE
2367
 
  AC_SUBST(MAINT)dnl
2368
 
]
2369
 
)
2370
 
 
2371
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
2372
 
 
 
1672
# _AM_MANGLE_OPTION(NAME)
 
1673
# -----------------------
 
1674
AC_DEFUN([_AM_MANGLE_OPTION],
 
1675
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1676
 
 
1677
# _AM_SET_OPTION(NAME)
 
1678
# ------------------------------
 
1679
# Set option NAME.  Presently that only means defining a flag for this option.
 
1680
AC_DEFUN([_AM_SET_OPTION],
 
1681
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
1682
 
 
1683
# _AM_SET_OPTIONS(OPTIONS)
 
1684
# ----------------------------------
 
1685
# OPTIONS is a space-separated list of Automake options.
 
1686
AC_DEFUN([_AM_SET_OPTIONS],
 
1687
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1688
 
 
1689
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1690
# -------------------------------------------
 
1691
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1692
AC_DEFUN([_AM_IF_OPTION],
 
1693
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1694
 
 
1695
#
 
1696
# Check to make sure that the build environment is sane.
 
1697
#
 
1698
 
 
1699
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
 
1700
 
 
1701
# This program is free software; you can redistribute it and/or modify
 
1702
# it under the terms of the GNU General Public License as published by
 
1703
# the Free Software Foundation; either version 2, or (at your option)
 
1704
# any later version.
 
1705
 
 
1706
# This program is distributed in the hope that it will be useful,
 
1707
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1708
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1709
# GNU General Public License for more details.
 
1710
 
 
1711
# You should have received a copy of the GNU General Public License
 
1712
# along with this program; if not, write to the Free Software
 
1713
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1714
# 02111-1307, USA.
 
1715
 
 
1716
# serial 3
 
1717
 
 
1718
# AM_SANITY_CHECK
 
1719
# ---------------
 
1720
AC_DEFUN([AM_SANITY_CHECK],
 
1721
[AC_MSG_CHECKING([whether build environment is sane])
 
1722
# Just in case
 
1723
sleep 1
 
1724
echo timestamp > conftest.file
 
1725
# Do `set' in a subshell so we don't clobber the current shell's
 
1726
# arguments.  Must try -L first in case configure is actually a
 
1727
# symlink; some systems play weird games with the mod time of symlinks
 
1728
# (eg FreeBSD returns the mod time of the symlink's containing
 
1729
# directory).
 
1730
if (
 
1731
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
1732
   if test "$[*]" = "X"; then
 
1733
      # -L didn't work.
 
1734
      set X `ls -t $srcdir/configure conftest.file`
 
1735
   fi
 
1736
   rm -f conftest.file
 
1737
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1738
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1739
 
 
1740
      # If neither matched, then we have a broken ls.  This can happen
 
1741
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1742
      # broken ls alias from the environment.  This has actually
 
1743
      # happened.  Such a system could not be considered "sane".
 
1744
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1745
alias in your environment])
 
1746
   fi
 
1747
 
 
1748
   test "$[2]" = conftest.file
 
1749
   )
 
1750
then
 
1751
   # Ok.
 
1752
   :
 
1753
else
 
1754
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1755
Check your system clock])
 
1756
fi
 
1757
AC_MSG_RESULT(yes)])
 
1758
 
 
1759
# AM_PROG_INSTALL_STRIP
 
1760
 
 
1761
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
1762
 
 
1763
# This program is free software; you can redistribute it and/or modify
 
1764
# it under the terms of the GNU General Public License as published by
 
1765
# the Free Software Foundation; either version 2, or (at your option)
 
1766
# any later version.
 
1767
 
 
1768
# This program is distributed in the hope that it will be useful,
 
1769
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1770
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1771
# GNU General Public License for more details.
 
1772
 
 
1773
# You should have received a copy of the GNU General Public License
 
1774
# along with this program; if not, write to the Free Software
 
1775
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1776
# 02111-1307, USA.
 
1777
 
 
1778
# One issue with vendor `install' (even GNU) is that you can't
 
1779
# specify the program used to strip binaries.  This is especially
 
1780
# annoying in cross-compiling environments, where the build's strip
 
1781
# is unlikely to handle the host's binaries.
 
1782
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
1783
# always use install-sh in `make install-strip', and initialize
 
1784
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1785
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1786
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1787
# Installed binaries are usually stripped using `strip' when the user
 
1788
# run `make install-strip'.  However `strip' might not be the right
 
1789
# tool to use in cross-compilation environments, therefore Automake
 
1790
# will honor the `STRIP' environment variable to overrule this program.
 
1791
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1792
if test "$cross_compiling" != no; then
 
1793
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1794
fi
 
1795
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
1796
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1797
 
 
1798
# Check how to create a tarball.                            -*- Autoconf -*-
 
1799
 
 
1800
# Copyright (C) 2004  Free Software Foundation, Inc.
 
1801
 
 
1802
# This program is free software; you can redistribute it and/or modify
 
1803
# it under the terms of the GNU General Public License as published by
 
1804
# the Free Software Foundation; either version 2, or (at your option)
 
1805
# any later version.
 
1806
 
 
1807
# This program is distributed in the hope that it will be useful,
 
1808
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
1809
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
1810
# GNU General Public License for more details.
 
1811
 
 
1812
# You should have received a copy of the GNU General Public License
 
1813
# along with this program; if not, write to the Free Software
 
1814
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
1815
# 02111-1307, USA.
 
1816
 
 
1817
# serial 1
 
1818
 
 
1819
 
 
1820
# _AM_PROG_TAR(FORMAT)
 
1821
# --------------------
 
1822
# Check how to create a tarball in format FORMAT.
 
1823
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1824
#
 
1825
# Substitute a variable $(am__tar) that is a command
 
1826
# writing to stdout a FORMAT-tarball containing the directory
 
1827
# $tardir.
 
1828
#     tardir=directory && $(am__tar) > result.tar
 
1829
#
 
1830
# Substitute a variable $(am__untar) that extract such
 
1831
# a tarball read from stdin.
 
1832
#     $(am__untar) < result.tar
 
1833
AC_DEFUN([_AM_PROG_TAR],
 
1834
[# Always define AMTAR for backward compatibility.
 
1835
AM_MISSING_PROG([AMTAR], [tar])
 
1836
m4_if([$1], [v7],
 
1837
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1838
     [m4_case([$1], [ustar],, [pax],,
 
1839
              [m4_fatal([Unknown tar format])])
 
1840
AC_MSG_CHECKING([how to create a $1 tar archive])
 
1841
# Loop over all known methods to create a tar archive until one works.
 
1842
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1843
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1844
# Do not fold the above two line into one, because Tru64 sh and
 
1845
# Solaris sh will not grok spaces in the rhs of `-'.
 
1846
for _am_tool in $_am_tools
 
1847
do
 
1848
  case $_am_tool in
 
1849
  gnutar)
 
1850
    for _am_tar in tar gnutar gtar;
 
1851
    do
 
1852
      AM_RUN_LOG([$_am_tar --version]) && break
 
1853
    done
 
1854
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1855
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1856
    am__untar="$_am_tar -xf -"
 
1857
    ;;
 
1858
  plaintar)
 
1859
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1860
    # ustar tarball either.
 
1861
    (tar --version) >/dev/null 2>&1 && continue
 
1862
    am__tar='tar chf - "$$tardir"'
 
1863
    am__tar_='tar chf - "$tardir"'
 
1864
    am__untar='tar xf -'
 
1865
    ;;
 
1866
  pax)
 
1867
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1868
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1869
    am__untar='pax -r'
 
1870
    ;;
 
1871
  cpio)
 
1872
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1873
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1874
    am__untar='cpio -i -H $1 -d'
 
1875
    ;;
 
1876
  none)
 
1877
    am__tar=false
 
1878
    am__tar_=false
 
1879
    am__untar=false
 
1880
    ;;
 
1881
  esac
 
1882
 
 
1883
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1884
  # and am__untar set.
 
1885
  test -n "${am_cv_prog_tar_$1}" && break
 
1886
 
 
1887
  # tar/untar a dummy directory, and stop if the command works
 
1888
  rm -rf conftest.dir
 
1889
  mkdir conftest.dir
 
1890
  echo GrepMe > conftest.dir/file
 
1891
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1892
  rm -rf conftest.dir
 
1893
  if test -s conftest.tar; then
 
1894
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1895
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1896
  fi
 
1897
done
 
1898
rm -rf conftest.dir
 
1899
 
 
1900
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1901
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1902
AC_SUBST([am__tar])
 
1903
AC_SUBST([am__untar])
 
1904
]) # _AM_PROG_TAR
 
1905
 
 
1906
m4_include([m4/curses.m4])
 
1907
m4_include([m4/glib.m4])
 
1908
m4_include([m4/gtk.m4])
 
1909
m4_include([m4/iconv.m4])
 
1910
m4_include([m4/qt.m4])
 
1911
m4_include([acinclude.m4])