~ubuntu-branches/ubuntu/edgy/libwpd/edgy-security

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2005-12-09 16:20:02 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20051209162002-6yx3aa0jrh06oocj
Tags: 0.8.4-2
* re-autogen to fix hppa build
* update automake builddep and add autoconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
4
# 2005  Free Software Foundation, Inc.
13
13
 
14
14
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
15
 
16
 
# serial 47 AC_PROG_LIBTOOL
 
16
# serial 47 Debian 1.5.20-2 AC_PROG_LIBTOOL
17
17
 
18
18
 
19
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
143
143
default_ofile=libtool
144
144
can_build_shared=yes
145
145
 
146
 
# All known linkers require a `.a' archive for static linking (except M$VC,
 
146
# All known linkers require a `.a' archive for static linking (except MSVC,
147
147
# which needs '.lib').
148
148
libext=a
149
149
ltmain="$ac_aux_dir/ltmain.sh"
359
359
# find a string as large as possible, as long as the shell can cope with it
360
360
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
361
361
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
362
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
363
 
       echo_test_string="`eval $cmd`" &&
 
362
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
363
       echo_test_string=`eval $cmd` &&
364
364
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
365
365
    then
366
366
      break
529
529
  # Find out which ABI we are using.
530
530
  echo 'int i;' > conftest.$ac_ext
531
531
  if AC_TRY_EVAL(ac_compile); then
532
 
    case "`/usr/bin/file conftest.o`" in
 
532
    case `/usr/bin/file conftest.o` in
533
533
    *32-bit*)
534
534
      case $host in
535
535
        x86_64-*linux*)
611
611
   # with a dollar sign (not a hyphen), so the echo should work correctly.
612
612
   # The option is referenced via a variable to avoid confusing sed.
613
613
   lt_compile=`echo "$ac_compile" | $SED \
614
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
614
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
615
615
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
616
616
   -e 's:$: $lt_compiler_flag:'`
617
617
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
650
650
   LDFLAGS="$LDFLAGS $3"
651
651
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
652
652
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
653
 
     # The compiler can only warn and ignore the option if not recognized
 
653
     # The linker can only warn and ignore the option if not recognized
654
654
     # So say no if there are warnings
655
655
     if test -s conftest.err; then
656
656
       # Append any errors to the config.log.
725
725
    elif test -x /usr/sbin/sysctl; then
726
726
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
727
727
    else
728
 
      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
 
728
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
729
729
    fi
730
730
    # And add a safety zone
731
731
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
737
737
    # nice to cause kernel panics so lets avoid the loop below.
738
738
    # First set a reasonable default.
739
739
    lt_cv_sys_max_cmd_len=16384
740
 
    # 
 
740
    #
741
741
    if test -x /sbin/sysconfig; then
742
742
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
743
743
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
854
854
}]
855
855
EOF
856
856
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
857
 
    (./conftest; exit; ) 2>/dev/null
 
857
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
858
858
    lt_status=$?
859
859
    case x$lt_status in
860
860
      x$lt_dlno_uscore) $1 ;;
1003
1003
   # Note that $ac_compile itself does not contain backslashes and begins
1004
1004
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1005
1005
   lt_compile=`echo "$ac_compile" | $SED \
1006
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1006
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1007
1007
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1008
1008
   -e 's:$: $lt_compiler_flag:'`
1009
1009
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1021
1021
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1022
1022
     fi
1023
1023
   fi
1024
 
   chmod u+w .
 
1024
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1025
1025
   $rm conftest*
1026
1026
   # SGI C++ compiler will create directory out/ii_files/ for
1027
1027
   # template instantiation
1281
1281
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1282
1282
      dldir=$destdir/`dirname \$dlpath`~
1283
1283
      test -d \$dldir || mkdir -p \$dldir~
1284
 
      $install_prog $dir/$dlname \$dldir/$dlname'
 
1284
      $install_prog $dir/$dlname \$dldir/$dlname~
 
1285
      chmod a+x \$dldir/$dlname'
1285
1286
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1286
1287
      dlpath=$dir/\$dldll~
1287
1288
       $rm \$dlpath'
1334
1335
  soname_spec='${libname}${release}${major}$shared_ext'
1335
1336
  shlibpath_overrides_runpath=yes
1336
1337
  shlibpath_var=DYLD_LIBRARY_PATH
1337
 
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
1338
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1338
1339
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1339
1340
  if test "$GCC" = yes; then
1340
1341
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1372
1373
freebsd* | dragonfly*)
1373
1374
  # DragonFly does not have aout.  When/if they implement a new
1374
1375
  # versioning mechanism, adjust this.
1375
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
1376
  if test -x /usr/bin/objformat; then
 
1377
    objformat=`/usr/bin/objformat`
 
1378
  else
 
1379
    case $host_os in
 
1380
    freebsd[[123]]*) objformat=aout ;;
 
1381
    *) objformat=elf ;;
 
1382
    esac
 
1383
  fi
1376
1384
  version_type=freebsd-$objformat
1377
1385
  case $version_type in
1378
1386
    freebsd-elf*)
1417
1425
  version_type=sunos
1418
1426
  need_lib_prefix=no
1419
1427
  need_version=no
1420
 
  case "$host_cpu" in
 
1428
  case $host_cpu in
1421
1429
  ia64*)
1422
1430
    shrext_cmds='.so'
1423
1431
    hardcode_into_libs=yes
1514
1522
  # before this can be enabled.
1515
1523
  hardcode_into_libs=yes
1516
1524
 
1517
 
  # find out which ABI we are using
1518
 
  libsuff=
1519
 
  case "$host_cpu" in
1520
 
  x86_64*|s390x*|powerpc64*)
1521
 
    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1522
 
    if AC_TRY_EVAL(ac_compile); then
1523
 
      case `/usr/bin/file conftest.$ac_objext` in
1524
 
      *64-bit*)
1525
 
        libsuff=64
1526
 
        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1527
 
        ;;
1528
 
      esac
1529
 
    fi
1530
 
    rm -rf conftest*
1531
 
    ;;
1532
 
  esac
1533
 
 
1534
1525
  # Append ld.so.conf contents to the search path
1535
1526
  if test -f /etc/ld.so.conf; then
1536
1527
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1537
 
    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
 
1528
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1538
1529
  fi
1539
1530
 
1540
1531
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1546
1537
  dynamic_linker='GNU/Linux ld.so'
1547
1538
  ;;
1548
1539
 
 
1540
netbsdelf*-gnu)
 
1541
  version_type=linux
 
1542
  need_lib_prefix=no
 
1543
  need_version=no
 
1544
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1545
  soname_spec='${libname}${release}${shared_ext}$major'
 
1546
  shlibpath_var=LD_LIBRARY_PATH
 
1547
  shlibpath_overrides_runpath=no
 
1548
  hardcode_into_libs=yes
 
1549
  dynamic_linker='NetBSD ld.elf_so'
 
1550
  ;;
 
1551
 
1549
1552
knetbsd*-gnu)
1550
1553
  version_type=linux
1551
1554
  need_lib_prefix=no
1830
1833
 
1831
1834
# AC_LIBTOOL_WIN32_DLL
1832
1835
# --------------------
1833
 
# declare package support for building win32 dll's
 
1836
# declare package support for building win32 DLLs
1834
1837
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1835
1838
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1836
1839
])# AC_LIBTOOL_WIN32_DLL
2004
2007
      if test -n "$file_magic_test_file"; then
2005
2008
        case $deplibs_check_method in
2006
2009
        "file_magic "*)
2007
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
2010
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2008
2011
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2009
2012
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2010
2013
            $EGREP "$file_magic_regex" > /dev/null; then
2114
2117
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2115
2118
      lt_cv_path_LD="$ac_dir/$ac_prog"
2116
2119
      # Check to see if the program is GNU ld.  I'd rather use --version,
2117
 
      # but apparently some GNU ld's only accept -v.
 
2120
      # but apparently some variants of GNU ld only accept -v.
2118
2121
      # Break only if it was the GNU/non-GNU ld that we prefer.
2119
2122
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2120
2123
      *GNU* | *'with BFD'*)
2146
2149
AC_DEFUN([AC_PROG_LD_GNU],
2147
2150
[AC_REQUIRE([AC_PROG_EGREP])dnl
2148
2151
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2149
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2152
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2150
2153
case `$LD -v 2>&1 </dev/null` in
2151
2154
*GNU* | *'with BFD'*)
2152
2155
  lt_cv_prog_gnu_ld=yes
2260
2263
 
2261
2264
hpux10.20* | hpux11*)
2262
2265
  lt_cv_file_magic_cmd=/usr/bin/file
2263
 
  case "$host_cpu" in
 
2266
  case $host_cpu in
2264
2267
  ia64*)
2265
2268
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2266
2269
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2291
2294
  lt_cv_deplibs_check_method=pass_all
2292
2295
  ;;
2293
2296
 
2294
 
netbsd*)
 
2297
netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
2295
2298
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2296
2299
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2297
2300
  else
2434
2437
# -----------------------------------
2435
2438
# sets LIBLTDL to the link flags for the libltdl convenience library and
2436
2439
# LTDLINCL to the include flags for the libltdl header and adds
2437
 
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2438
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2439
 
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2440
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2441
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
2442
 
# flat and you're not using automake, define top_builddir and
2443
 
# top_srcdir appropriately in the Makefiles.
 
2440
# --enable-ltdl-convenience to the configure arguments.  Note that
 
2441
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2442
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
2443
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
2444
# (note the single quotes!).  If your package is not flat and you're not
 
2445
# using automake, define top_builddir and top_srcdir appropriately in
 
2446
# the Makefiles.
2444
2447
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2445
2448
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2446
2449
  case $enable_ltdl_convenience in
2459
2462
# -----------------------------------
2460
2463
# sets LIBLTDL to the link flags for the libltdl installable library and
2461
2464
# LTDLINCL to the include flags for the libltdl header and adds
2462
 
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2463
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2464
 
# DIRECTORY is not provided and an installed libltdl is not found, it is
2465
 
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2466
 
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2467
 
# quotes!).  If your package is not flat and you're not using automake,
2468
 
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
2465
# --enable-ltdl-install to the configure arguments.  Note that
 
2466
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2467
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
2468
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
2469
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
2470
# flat and you're not using automake, define top_builddir and top_srcdir
 
2471
# appropriately in the Makefiles.
2469
2472
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2470
2473
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2471
2474
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2644
2647
 
2645
2648
# On AIX, shared libraries and static libraries use the same namespace, and
2646
2649
# are all built from PIC.
2647
 
case "$host_os" in
 
2650
case $host_os in
2648
2651
aix3*)
2649
2652
  test "$enable_shared" = yes && enable_static=no
2650
2653
  if test -n "$RANLIB"; then
2711
2714
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2712
2715
 
2713
2716
# Source file extension for C++ test sources.
2714
 
ac_ext=cc
 
2717
ac_ext=cpp
2715
2718
 
2716
2719
# Object file extension for compiled C++ test sources.
2717
2720
objext=o
2927
2930
        # Exported symbols can be pulled into shared objects from archives
2928
2931
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2929
2932
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2930
 
        # This is similar to how AIX traditionally builds it's shared libraries.
 
2933
        # This is similar to how AIX traditionally builds its shared libraries.
2931
2934
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2932
2935
      fi
2933
2936
    fi
2966
2969
    fi
2967
2970
  ;;
2968
2971
      darwin* | rhapsody*)
2969
 
        case "$host_os" in
 
2972
        case $host_os in
2970
2973
        rhapsody* | darwin1.[[012]])
2971
2974
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2972
2975
         ;;
3004
3007
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3005
3008
        fi
3006
3009
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3007
 
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3010
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3008
3011
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3009
3012
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3010
3013
          else
3017
3020
         output_verbose_link_cmd='echo'
3018
3021
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3019
3022
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3020
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3023
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3021
3024
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3022
3025
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3023
3026
          ;;
3097
3100
    ;;
3098
3101
  hpux10*|hpux11*)
3099
3102
    if test $with_gnu_ld = no; then
3100
 
      case "$host_cpu" in
 
3103
      case $host_cpu in
3101
3104
      hppa*64*)
3102
3105
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3103
3106
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3113
3116
        ;;
3114
3117
      esac
3115
3118
    fi
3116
 
    case "$host_cpu" in
 
3119
    case $host_cpu in
3117
3120
    hppa*64*)
3118
3121
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3119
3122
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3139
3142
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3140
3143
        ;;
3141
3144
      aCC*)
3142
 
        case "$host_cpu" in
 
3145
        case $host_cpu in
3143
3146
        hppa*64*|ia64*)
3144
3147
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3145
3148
          ;;
3160
3163
      *)
3161
3164
        if test "$GXX" = yes; then
3162
3165
          if test $with_gnu_ld = no; then
3163
 
            case "$host_cpu" in
 
3166
            case $host_cpu in
3164
3167
            ia64*|hppa*64*)
3165
3168
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3166
3169
              ;;
3261
3264
 
3262
3265
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3263
3266
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3264
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
3267
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3265
3268
        ;;
3266
3269
      cxx*)
3267
3270
        # Compaq C++
3304
3307
        ;;
3305
3308
    esac
3306
3309
    ;;
3307
 
  netbsd*)
 
3310
  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3308
3311
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3309
3312
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3310
3313
      wlarc=
3493
3496
    case $cc_basename in
3494
3497
      CC*)
3495
3498
        # Sun C++ 4.2, 5.x and Centerline C++
 
3499
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3496
3500
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3497
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3501
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3498
3502
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3499
 
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3503
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3500
3504
 
3501
3505
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3502
3506
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3516
3520
        esac
3517
3521
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3518
3522
 
3519
 
        # Commands to make compiler produce verbose output that lists
3520
 
        # what "hidden" libraries, object files and flags are used when
3521
 
        # linking a shared library.
3522
 
        #
3523
 
        # There doesn't appear to be a way to prevent this compiler from
3524
 
        # explicitly linking system object files so we need to strip them
3525
 
        # from the output so that they don't get included in the library
3526
 
        # dependencies.
3527
 
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
3523
        output_verbose_link_cmd='echo'
3528
3524
 
3529
3525
        # Archives containing C++ object files must be created using
3530
3526
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3681
3677
  # The `*' in the case matches for architectures that use `case' in
3682
3678
  # $output_verbose_cmd can trigger glob expansion during the loop
3683
3679
  # eval without this substitution.
3684
 
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
3680
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3685
3681
 
3686
3682
  for p in `eval $output_verbose_link_cmd`; do
3687
3683
    case $p in
3757
3753
 
3758
3754
$rm -f confest.$objext
3759
3755
 
 
3756
# PORTME: override above test on systems where it is broken
 
3757
ifelse([$1],[CXX],
 
3758
[case $host_os in
 
3759
solaris*)
 
3760
  case $cc_basename in
 
3761
  CC*)
 
3762
    # Adding this requires a known-good setup of shared libraries for
 
3763
    # Sun compiler versions before 5.6, else PIC objects from an old
 
3764
    # archive will be linked into the output, leading to subtle bugs.
 
3765
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
3766
    ;;
 
3767
  esac
 
3768
esac
 
3769
])
 
3770
 
3760
3771
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3761
3772
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3762
3773
esac
3826
3837
 
3827
3838
# On AIX, shared libraries and static libraries use the same namespace, and
3828
3839
# are all built from PIC.
3829
 
case "$host_os" in
 
3840
case $host_os in
3830
3841
aix3*)
3831
3842
  test "$enable_shared" = yes && enable_static=no
3832
3843
  if test -n "$RANLIB"; then
4725
4736
    hpux*)
4726
4737
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4727
4738
      # not for PA HP-UX.
4728
 
      case "$host_cpu" in
 
4739
      case $host_cpu in
4729
4740
      hppa*64*|ia64*)
4730
4741
        ;;
4731
4742
      *)
4794
4805
          aCC*)
4795
4806
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796
4807
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4797
 
            case "$host_cpu" in
 
4808
            case $host_cpu in
4798
4809
            hppa*64*|ia64*)
4799
4810
              # +Z the default
4800
4811
              ;;
4835
4846
            # Portland Group C++ compiler.
4836
4847
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4837
4848
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4838
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4849
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4839
4850
            ;;
4840
4851
          cxx*)
4841
4852
            # Compaq C++
4861
4872
            ;;
4862
4873
        esac
4863
4874
        ;;
4864
 
      netbsd*)
 
4875
      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4865
4876
        ;;
4866
4877
      osf3* | osf4* | osf5*)
4867
4878
        case $cc_basename in
4999
5010
    hpux*)
5000
5011
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5001
5012
      # not for PA HP-UX.
5002
 
      case "$host_cpu" in
 
5013
      case $host_cpu in
5003
5014
      hppa*64*|ia64*)
5004
5015
        # +Z the default
5005
5016
        ;;
5046
5057
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5047
5058
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5048
5059
      # not for PA HP-UX.
5049
 
      case "$host_cpu" in
 
5060
      case $host_cpu in
5050
5061
      hppa*64*|ia64*)
5051
5062
        # +Z the default
5052
5063
        ;;
5076
5087
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5077
5088
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5078
5089
        ;;
5079
 
      pgcc* | pgf77* | pgf90*)
 
5090
      pgcc* | pgf77* | pgf90* | pgf95*)
5080
5091
        # Portland Group compilers (*not* the Pentium gcc compiler,
5081
5092
        # which looks to be a dead project)
5082
5093
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5083
5094
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5084
 
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5095
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5085
5096
        ;;
5086
5097
      ccc*)
5087
5098
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5164
5175
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5165
5176
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5166
5177
fi
5167
 
case "$host_os" in
 
5178
case $host_os in
5168
5179
  # For platforms which do not support PIC, -DPIC is meaningless:
5169
5180
  *djgpp*)
5170
5181
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5199
5210
  cygwin* | mingw*)
5200
5211
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5201
5212
  ;;
 
5213
  linux*)
 
5214
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 
5215
  ;;
5202
5216
  *)
5203
5217
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5204
5218
  ;;
5260
5274
  if test "$with_gnu_ld" = yes; then
5261
5275
    # If archive_cmds runs LD, not CC, wlarc should be empty
5262
5276
    wlarc='${wl}'
5263
 
    
 
5277
 
5264
5278
    # Set some defaults for GNU ld with shared library support. These
5265
5279
    # are reset later if shared libraries are not supported. Putting them
5266
5280
    # here allows them to be overridden if necessary.
5281
5295
      *\ 2.11.*) ;; # other 2.11 versions
5282
5296
      *) supports_anon_versioning=yes ;;
5283
5297
    esac
5284
 
    
 
5298
 
5285
5299
    # See if GNU ld supports shared libraries.
5286
5300
    case $host_os in
5287
5301
    aix3* | aix4* | aix5*)
5355
5369
        tmp_addflag=
5356
5370
        case $cc_basename,$host_cpu in
5357
5371
        pgcc*)                          # Portland Group C compiler
5358
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5372
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5359
5373
          tmp_addflag=' $pic_flag'
5360
5374
          ;;
5361
 
        pgf77* | pgf90* )                       # Portland Group f77 and f90 compilers
5362
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5375
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
5376
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5363
5377
          tmp_addflag=' $pic_flag -Mnomain' ;;
5364
5378
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
5365
5379
          tmp_addflag=' -i_dynamic' ;;
5376
5390
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5377
5391
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5378
5392
        fi
 
5393
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5379
5394
      else
5380
5395
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5381
5396
      fi
5382
5397
      ;;
5383
5398
 
5384
 
    netbsd*)
 
5399
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5385
5400
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5386
5401
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5387
5402
        wlarc=
5565
5580
          # Exported symbols can be pulled into shared objects from archives
5566
5581
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5567
5582
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5568
 
          # This is similar to how AIX traditionally builds it's shared libraries.
 
5583
          # This is similar to how AIX traditionally builds its shared libraries.
5569
5584
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5570
5585
        fi
5571
5586
      fi
5605
5620
      ;;
5606
5621
 
5607
5622
    darwin* | rhapsody*)
5608
 
      case "$host_os" in
 
5623
      case $host_os in
5609
5624
        rhapsody* | darwin1.[[012]])
5610
5625
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5611
5626
         ;;
5634
5649
        output_verbose_link_cmd='echo'
5635
5650
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5636
5651
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5637
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5652
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5638
5653
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5639
5654
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5640
5655
    else
5643
5658
         output_verbose_link_cmd='echo'
5644
5659
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5645
5660
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5646
 
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
5661
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5647
5662
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5648
5663
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5649
5664
          ;;
5709
5724
 
5710
5725
    hpux10* | hpux11*)
5711
5726
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5712
 
        case "$host_cpu" in
 
5727
        case $host_cpu in
5713
5728
        hppa*64*|ia64*)
5714
5729
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5715
5730
          ;;
5718
5733
          ;;
5719
5734
        esac
5720
5735
      else
5721
 
        case "$host_cpu" in
 
5736
        case $host_cpu in
5722
5737
        hppa*64*|ia64*)
5723
5738
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5724
5739
          ;;
5728
5743
        esac
5729
5744
      fi
5730
5745
      if test "$with_gnu_ld" = no; then
5731
 
        case "$host_cpu" in
 
5746
        case $host_cpu in
5732
5747
        hppa*64*)
5733
5748
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5734
5749
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5771
5786
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5772
5787
      ;;
5773
5788
 
5774
 
    netbsd*)
 
5789
    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5775
5790
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5776
5791
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5777
5792
      else
6176
6191
AC_MSG_RESULT([$SED])
6177
6192
])
6178
6193
 
6179
 
 
6180
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
6181
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
6182
 
dnl also defines GSTUFF_PKG_ERRORS on error
6183
 
AC_DEFUN([PKG_CHECK_MODULES], [
6184
 
  succeeded=no
6185
 
 
6186
 
  if test -z "$PKG_CONFIG"; then
6187
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
6188
 
  fi
6189
 
 
6190
 
  if test "$PKG_CONFIG" = "no" ; then
6191
 
     echo "*** The pkg-config script could not be found. Make sure it is"
6192
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
6193
 
     echo "*** to the full path to pkg-config."
6194
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
6195
 
  else
6196
 
     PKG_CONFIG_MIN_VERSION=0.9.0
6197
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6198
 
        AC_MSG_CHECKING(for $2)
6199
 
 
6200
 
        if $PKG_CONFIG --exists "$2" ; then
6201
 
            AC_MSG_RESULT(yes)
6202
 
            succeeded=yes
6203
 
 
6204
 
            AC_MSG_CHECKING($1_CFLAGS)
6205
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
6206
 
            AC_MSG_RESULT($$1_CFLAGS)
6207
 
 
6208
 
            AC_MSG_CHECKING($1_LIBS)
6209
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
6210
 
            AC_MSG_RESULT($$1_LIBS)
6211
 
        else
6212
 
            $1_CFLAGS=""
6213
 
            $1_LIBS=""
6214
 
            ## If we have a custom action on failure, don't print errors, but 
6215
 
            ## do set a variable so people can do so.
6216
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6217
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
 
6194
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
6195
 
6196
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
6197
#
 
6198
# This program is free software; you can redistribute it and/or modify
 
6199
# it under the terms of the GNU General Public License as published by
 
6200
# the Free Software Foundation; either version 2 of the License, or
 
6201
# (at your option) any later version.
 
6202
#
 
6203
# This program is distributed in the hope that it will be useful, but
 
6204
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
6205
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
6206
# General Public License for more details.
 
6207
#
 
6208
# You should have received a copy of the GNU General Public License
 
6209
# along with this program; if not, write to the Free Software
 
6210
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
6211
#
 
6212
# As a special exception to the GNU General Public License, if you
 
6213
# distribute this file as part of a program that contains a
 
6214
# configuration script generated by Autoconf, you may include it under
 
6215
# the same distribution terms that you use for the rest of that program.
 
6216
 
 
6217
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
6218
# ----------------------------------
 
6219
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
6220
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
6221
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
6222
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
6223
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
6224
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
6225
fi
 
6226
if test -n "$PKG_CONFIG"; then
 
6227
        _pkg_min_version=m4_default([$1], [0.9.0])
 
6228
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
6229
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
6230
                AC_MSG_RESULT([yes])
 
6231
        else
 
6232
                AC_MSG_RESULT([no])
 
6233
                PKG_CONFIG=""
 
6234
        fi
 
6235
                
 
6236
fi[]dnl
 
6237
])# PKG_PROG_PKG_CONFIG
 
6238
 
 
6239
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
6240
#
 
6241
# Check to see whether a particular set of modules exists.  Similar
 
6242
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
6243
#
 
6244
#
 
6245
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
6246
# this or PKG_CHECK_MODULES is called, or make sure to call
 
6247
# PKG_CHECK_EXISTS manually
 
6248
# --------------------------------------------------------------
 
6249
AC_DEFUN([PKG_CHECK_EXISTS],
 
6250
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
6251
if test -n "$PKG_CONFIG" && \
 
6252
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
6253
  m4_ifval([$2], [$2], [:])
 
6254
m4_ifvaln([$3], [else
 
6255
  $3])dnl
 
6256
fi])
 
6257
 
 
6258
 
 
6259
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
6260
# ---------------------------------------------
 
6261
m4_define([_PKG_CONFIG],
 
6262
[if test -n "$PKG_CONFIG"; then
 
6263
    if test -n "$$1"; then
 
6264
        pkg_cv_[]$1="$$1"
 
6265
    else
 
6266
        PKG_CHECK_EXISTS([$3],
 
6267
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
6268
                         [pkg_failed=yes])
 
6269
    fi
 
6270
else
 
6271
        pkg_failed=untried
 
6272
fi[]dnl
 
6273
])# _PKG_CONFIG
 
6274
 
 
6275
# _PKG_SHORT_ERRORS_SUPPORTED
 
6276
# -----------------------------
 
6277
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
6278
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
6279
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
6280
        _pkg_short_errors_supported=yes
 
6281
else
 
6282
        _pkg_short_errors_supported=no
 
6283
fi[]dnl
 
6284
])# _PKG_SHORT_ERRORS_SUPPORTED
 
6285
 
 
6286
 
 
6287
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
6288
# [ACTION-IF-NOT-FOUND])
 
6289
#
 
6290
#
 
6291
# Note that if there is a possibility the first call to
 
6292
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
6293
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
6294
#
 
6295
#
 
6296
# --------------------------------------------------------------
 
6297
AC_DEFUN([PKG_CHECK_MODULES],
 
6298
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
6299
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
6300
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
6301
 
 
6302
pkg_failed=no
 
6303
AC_MSG_CHECKING([for $1])
 
6304
 
 
6305
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
6306
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
6307
 
 
6308
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
6309
and $1[]_LIBS to avoid the need to call pkg-config.
 
6310
See the pkg-config man page for more details.])
 
6311
 
 
6312
if test $pkg_failed = yes; then
 
6313
        _PKG_SHORT_ERRORS_SUPPORTED
 
6314
        if test $_pkg_short_errors_supported = yes; then
 
6315
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
6316
        else 
 
6317
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6218
6318
        fi
6219
 
 
6220
 
        AC_SUBST($1_CFLAGS)
6221
 
        AC_SUBST($1_LIBS)
6222
 
     else
6223
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6224
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
6225
 
     fi
6226
 
  fi
6227
 
 
6228
 
  if test $succeeded = yes; then
6229
 
     ifelse([$3], , :, [$3])
6230
 
  else
6231
 
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
6232
 
  fi
6233
 
])
6234
 
 
6235
 
 
 
6319
        # Put the nasty error message in config.log where it belongs
 
6320
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
6321
 
 
6322
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
6323
[Package requirements ($2) were not met:
 
6324
 
 
6325
$$1_PKG_ERRORS
 
6326
 
 
6327
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
6328
installed software in a non-standard prefix.
 
6329
 
 
6330
_PKG_TEXT
 
6331
])],
 
6332
                [$4])
 
6333
elif test $pkg_failed = untried; then
 
6334
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
6335
[The pkg-config script could not be found or is too old.  Make sure it
 
6336
is in your PATH or set the PKG_CONFIG environment variable to the full
 
6337
path to pkg-config.
 
6338
 
 
6339
_PKG_TEXT
 
6340
 
 
6341
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
6342
                [$4])
 
6343
else
 
6344
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
6345
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
6346
        AC_MSG_RESULT([yes])
 
6347
        ifelse([$3], , :, [$3])
 
6348
fi[]dnl
 
6349
])# PKG_CHECK_MODULES
6236
6350
 
6237
6351
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
6238
6352
#
6251
6365
# Call AM_AUTOMAKE_VERSION so it can be traced.
6252
6366
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6253
6367
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6254
 
         [AM_AUTOMAKE_VERSION([1.9.5])])
 
6368
         [AM_AUTOMAKE_VERSION([1.9.6])])
6255
6369
 
6256
6370
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6257
6371