~ubuntu-branches/ubuntu/intrepid/xserver-xorg-input-vmmouse/intrepid-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Drew Parsons
  • Date: 2007-10-29 01:24:59 UTC
  • mfrom: (1.2.1 etch) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071029012459-816eixs28mmshb6u
Tags: 1:12.4.3-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
15
 
16
 
# serial 48 AC_PROG_LIBTOOL
 
16
# serial 51 Debian 1.5.24-1 AC_PROG_LIBTOOL
17
17
 
18
18
 
19
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
176
176
test -z "$ac_objext" && ac_objext=o
177
177
 
178
178
# Determine commands to create old-style static archives.
179
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
179
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
180
180
old_postinstall_cmds='chmod 644 $oldlib'
181
181
old_postuninstall_cmds=
182
182
 
263
263
# Check for compiler boilerplate output or warnings with
264
264
# the simple compiler test code.
265
265
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
266
 
[ac_outfile=conftest.$ac_objext
267
 
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
266
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
267
ac_outfile=conftest.$ac_objext
 
268
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
268
269
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269
270
_lt_compiler_boilerplate=`cat conftest.err`
270
271
$rm conftest*
276
277
# Check for linker boilerplate output or warnings with
277
278
# the simple link test code.
278
279
AC_DEFUN([_LT_LINKER_BOILERPLATE],
279
 
[ac_outfile=conftest.$ac_objext
280
 
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
280
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
281
ac_outfile=conftest.$ac_objext
 
282
echo "$lt_simple_link_test_code" >conftest.$ac_ext
281
283
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282
284
_lt_linker_boilerplate=`cat conftest.err`
283
285
$rm conftest*
293
295
# If we don't find anything, use the default library path according
294
296
# to the aix ld manual.
295
297
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296
 
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297
 
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298
 
}'`
 
298
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
299
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
300
lt_aix_libpath_sed='
 
301
    /Import File Strings/,/^$/ {
 
302
        /^0/ {
 
303
            s/^0  *\(.*\)$/\1/
 
304
            p
 
305
        }
 
306
    }'
 
307
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
299
308
# Check for a 64-bit object if we didn't find anything.
300
 
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
301
 
}'`; fi],[])
 
309
if test -z "$aix_libpath"; then
 
310
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
311
fi],[])
302
312
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303
313
])# _LT_AC_SYS_LIBPATH_AIX
304
314
 
529
539
  rm -rf conftest*
530
540
  ;;
531
541
 
532
 
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
542
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
543
s390*-*linux*|sparc*-*linux*)
533
544
  # Find out which ABI we are using.
534
545
  echo 'int i;' > conftest.$ac_ext
535
546
  if AC_TRY_EVAL(ac_compile); then
536
547
    case `/usr/bin/file conftest.o` in
537
548
    *32-bit*)
538
549
      case $host in
 
550
        x86_64-*kfreebsd*-gnu)
 
551
          LD="${LD-ld} -m elf_i386_fbsd"
 
552
          ;;
539
553
        x86_64-*linux*)
540
554
          LD="${LD-ld} -m elf_i386"
541
555
          ;;
552
566
      ;;
553
567
    *64-bit*)
554
568
      case $host in
 
569
        x86_64-*kfreebsd*-gnu)
 
570
          LD="${LD-ld} -m elf_x86_64_fbsd"
 
571
          ;;
555
572
        x86_64-*linux*)
556
573
          LD="${LD-ld} -m elf_x86_64"
557
574
          ;;
623
640
AC_CACHE_CHECK([$1], [$2],
624
641
  [$2=no
625
642
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
643
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
627
644
   lt_compiler_flag="$3"
628
645
   # Insert the option either (1) after the last *FLAGS variable, or
629
646
   # (2) before a word containing "conftest.", or (3) at the end.
664
681
# ------------------------------------------------------------
665
682
# Check whether the given compiler option works
666
683
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667
 
[AC_CACHE_CHECK([$1], [$2],
 
684
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
685
AC_CACHE_CHECK([$1], [$2],
668
686
  [$2=no
669
687
   save_LDFLAGS="$LDFLAGS"
670
688
   LDFLAGS="$LDFLAGS $3"
671
 
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
689
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
672
690
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673
691
     # The linker can only warn and ignore the option if not recognized
674
692
     # So say no if there are warnings
782
800
    fi
783
801
    ;;
784
802
  *)
785
 
    # If test is not a shell built-in, we'll probably end up computing a
786
 
    # maximum length that is only half of the actual maximum length, but
787
 
    # we can't tell.
788
 
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789
 
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
803
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
804
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
805
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
806
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
807
    else
 
808
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
809
      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790
810
               = "XX$teststring") >/dev/null 2>&1 &&
791
 
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
792
 
            lt_cv_sys_max_cmd_len=$new_result &&
793
 
            test $i != 17 # 1/2 MB should be enough
794
 
    do
795
 
      i=`expr $i + 1`
796
 
      teststring=$teststring$teststring
797
 
    done
798
 
    teststring=
799
 
    # Add a significant safety factor because C++ compilers can tack on massive
800
 
    # amounts of additional arguments before passing them to the linker.
801
 
    # It appears as though 1/2 is a usable value.
802
 
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
811
              new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
812
              lt_cv_sys_max_cmd_len=$new_result &&
 
813
              test $i != 17 # 1/2 MB should be enough
 
814
      do
 
815
        i=`expr $i + 1`
 
816
        teststring=$teststring$teststring
 
817
      done
 
818
      teststring=
 
819
      # Add a significant safety factor because C++ compilers can tack on massive
 
820
      # amounts of additional arguments before passing them to the linker.
 
821
      # It appears as though 1/2 is a usable value.
 
822
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
823
    fi
803
824
    ;;
804
825
  esac
805
826
])
1026
1047
# ---------------------------------
1027
1048
# Check to see if options -c and -o are simultaneously supported by compiler
1028
1049
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029
 
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
1050
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1051
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030
1052
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031
1053
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032
1054
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1034
1056
   mkdir conftest
1035
1057
   cd conftest
1036
1058
   mkdir out
1037
 
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1059
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1038
1060
 
1039
1061
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1040
1062
   # Insert the option either (1) after the last *FLAGS variable, or
1174
1196
   darwin*)
1175
1197
       if test -n "$STRIP" ; then
1176
1198
         striplib="$STRIP -x"
 
1199
         old_striplib="$STRIP -S"
1177
1200
         AC_MSG_RESULT([yes])
1178
1201
       else
1179
1202
  AC_MSG_RESULT([no])
1191
1214
# -----------------------------
1192
1215
# PORTME Fill in your ld.so characteristics
1193
1216
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194
 
[AC_MSG_CHECKING([dynamic linker characteristics])
 
1217
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1218
AC_MSG_CHECKING([dynamic linker characteristics])
1195
1219
library_names_spec=
1196
1220
libname_spec='lib$name'
1197
1221
soname_spec=
1205
1229
version_type=none
1206
1230
dynamic_linker="$host_os ld.so"
1207
1231
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
1232
m4_if($1,[],[
1208
1233
if test "$GCC" = yes; then
1209
 
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210
 
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
 
1234
  case $host_os in
 
1235
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
1236
    *) lt_awk_arg="/^libraries:/" ;;
 
1237
  esac
 
1238
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1239
  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1211
1240
    # if the path contains ";" then we assume it to be the separator
1212
1241
    # otherwise default to the standard path separator (i.e. ":") - it is
1213
1242
    # assumed that no part of a normal pathname contains ";" but that should
1214
1243
    # okay in the real world where ";" in dirpaths is itself problematic.
1215
 
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1244
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1216
1245
  else
1217
 
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1246
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218
1247
  fi
 
1248
  # Ok, now we have the path, separated by spaces, we can step through it
 
1249
  # and add multilib dir if necessary.
 
1250
  lt_tmp_lt_search_path_spec=
 
1251
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
1252
  for lt_sys_path in $lt_search_path_spec; do
 
1253
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
1254
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
1255
    else
 
1256
      test -d "$lt_sys_path" && \
 
1257
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
1258
    fi
 
1259
  done
 
1260
  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
 
1261
BEGIN {RS=" "; FS="/|\n";} {
 
1262
  lt_foo="";
 
1263
  lt_count=0;
 
1264
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
1265
    if ($lt_i != "" && $lt_i != ".") {
 
1266
      if ($lt_i == "..") {
 
1267
        lt_count++;
 
1268
      } else {
 
1269
        if (lt_count == 0) {
 
1270
          lt_foo="/" $lt_i lt_foo;
 
1271
        } else {
 
1272
          lt_count--;
 
1273
        }
 
1274
      }
 
1275
    }
 
1276
  }
 
1277
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
1278
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
1279
}'`
 
1280
  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1219
1281
else
1220
1282
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221
 
fi
 
1283
fi])
1222
1284
need_lib_prefix=unknown
1223
1285
hardcode_into_libs=no
1224
1286
 
1375
1437
  shlibpath_overrides_runpath=yes
1376
1438
  shlibpath_var=DYLD_LIBRARY_PATH
1377
1439
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1378
 
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1379
 
  if test "$GCC" = yes; then
1380
 
    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"`
1381
 
  else
1382
 
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1383
 
  fi
 
1440
  m4_if([$1], [],[
 
1441
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
1384
1442
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385
1443
  ;;
1386
1444
 
1397
1455
  dynamic_linker=no
1398
1456
  ;;
1399
1457
 
1400
 
kfreebsd*-gnu)
1401
 
  version_type=linux
1402
 
  need_lib_prefix=no
1403
 
  need_version=no
1404
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1405
 
  soname_spec='${libname}${release}${shared_ext}$major'
1406
 
  shlibpath_var=LD_LIBRARY_PATH
1407
 
  shlibpath_overrides_runpath=no
1408
 
  hardcode_into_libs=yes
1409
 
  dynamic_linker='GNU ld.so'
1410
 
  ;;
1411
 
 
1412
1458
freebsd* | dragonfly*)
1413
1459
  # DragonFly does not have aout.  When/if they implement a new
1414
1460
  # versioning mechanism, adjust this.
1446
1492
    shlibpath_overrides_runpath=no
1447
1493
    hardcode_into_libs=yes
1448
1494
    ;;
1449
 
  freebsd*) # from 4.6 on
 
1495
  *) # from 4.6 on, and DragonFly
1450
1496
    shlibpath_overrides_runpath=yes
1451
1497
    hardcode_into_libs=yes
1452
1498
    ;;
1509
1555
  postinstall_cmds='chmod 555 $lib'
1510
1556
  ;;
1511
1557
 
1512
 
interix3*)
 
1558
interix[[3-9]]*)
1513
1559
  version_type=linux
1514
1560
  need_lib_prefix=no
1515
1561
  need_version=no
1564
1610
  ;;
1565
1611
 
1566
1612
# This must be Linux ELF.
1567
 
linux*)
 
1613
linux* | k*bsd*-gnu)
1568
1614
  version_type=linux
1569
1615
  need_lib_prefix=no
1570
1616
  need_version=no
1578
1624
  # before this can be enabled.
1579
1625
  hardcode_into_libs=yes
1580
1626
 
1581
 
  # find out which ABI we are using
1582
 
  libsuff=
1583
 
  case "$host_cpu" in
1584
 
  x86_64*|s390x*|powerpc64*)
1585
 
    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1586
 
    if AC_TRY_EVAL(ac_compile); then
1587
 
      case `/usr/bin/file conftest.$ac_objext` in
1588
 
      *64-bit*)
1589
 
        libsuff=64
1590
 
        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1591
 
        ;;
1592
 
      esac
1593
 
    fi
1594
 
    rm -rf conftest*
1595
 
    ;;
1596
 
  esac
1597
 
 
1598
1627
  # Append ld.so.conf contents to the search path
1599
1628
  if test -f /etc/ld.so.conf; then
1600
 
    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' ' '`
1601
 
    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
 
1629
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
1630
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1602
1631
  fi
1603
1632
 
1604
1633
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1610
1639
  dynamic_linker='GNU/Linux ld.so'
1611
1640
  ;;
1612
1641
 
1613
 
knetbsd*-gnu)
 
1642
netbsdelf*-gnu)
1614
1643
  version_type=linux
1615
1644
  need_lib_prefix=no
1616
1645
  need_version=no
1619
1648
  shlibpath_var=LD_LIBRARY_PATH
1620
1649
  shlibpath_overrides_runpath=no
1621
1650
  hardcode_into_libs=yes
1622
 
  dynamic_linker='GNU ld.so'
 
1651
  dynamic_linker='NetBSD ld.elf_so'
1623
1652
  ;;
1624
1653
 
1625
1654
netbsd*)
1703
1732
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1704
1733
  ;;
1705
1734
 
 
1735
rdos*)
 
1736
  dynamic_linker=no
 
1737
  ;;
 
1738
 
1706
1739
solaris*)
1707
1740
  version_type=linux
1708
1741
  need_lib_prefix=no
1808
1841
# _LT_AC_TAGCONFIG
1809
1842
# ----------------
1810
1843
AC_DEFUN([_LT_AC_TAGCONFIG],
1811
 
[AC_ARG_WITH([tags],
 
1844
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1845
AC_ARG_WITH([tags],
1812
1846
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1813
1847
        [include additional configurations @<:@automatic@:>@])],
1814
1848
    [tagnames="$withval"])
2069
2103
 
2070
2104
# AC_PATH_TOOL_PREFIX
2071
2105
# -------------------
2072
 
# find a file program which can recognise shared library
 
2106
# find a file program which can recognize shared library
2073
2107
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2074
2108
[AC_REQUIRE([AC_PROG_EGREP])dnl
2075
2109
AC_MSG_CHECKING([for $1])
2132
2166
 
2133
2167
# AC_PATH_MAGIC
2134
2168
# -------------
2135
 
# find a file program which can recognise a shared library
 
2169
# find a file program which can recognize a shared library
2136
2170
AC_DEFUN([AC_PATH_MAGIC],
2137
2171
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2138
2172
if test -z "$lt_cv_path_MAGIC_CMD"; then
2279
2313
# how to check for library dependencies
2280
2314
#  -- PORTME fill in with the dynamic library characteristics
2281
2315
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2282
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
 
2316
[AC_CACHE_CHECK([how to recognize dependent libraries],
2283
2317
lt_cv_deplibs_check_method,
2284
2318
[lt_cv_file_magic_cmd='$MAGIC_CMD'
2285
2319
lt_cv_file_magic_test_file=
2318
2352
 
2319
2353
mingw* | pw32*)
2320
2354
  # Base MSYS/MinGW do not provide the 'file' command needed by
2321
 
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2322
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2323
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2355
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
2356
  # unless we find 'file', for example because we are cross-compiling.
 
2357
  if ( file / ) >/dev/null 2>&1; then
 
2358
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2359
    lt_cv_file_magic_cmd='func_win32_libid'
 
2360
  else
 
2361
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
2362
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2363
  fi
2324
2364
  ;;
2325
2365
 
2326
2366
darwin* | rhapsody*)
2327
2367
  lt_cv_deplibs_check_method=pass_all
2328
2368
  ;;
2329
2369
 
2330
 
freebsd* | kfreebsd*-gnu | dragonfly*)
 
2370
freebsd* | dragonfly*)
2331
2371
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2332
2372
    case $host_cpu in
2333
2373
    i*86 )
2365
2405
  esac
2366
2406
  ;;
2367
2407
 
2368
 
interix3*)
 
2408
interix[[3-9]]*)
2369
2409
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2370
2410
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2371
2411
  ;;
2381
2421
  ;;
2382
2422
 
2383
2423
# This must be Linux ELF.
2384
 
linux*)
 
2424
linux* | k*bsd*-gnu)
2385
2425
  lt_cv_deplibs_check_method=pass_all
2386
2426
  ;;
2387
2427
 
2388
 
netbsd*)
 
2428
netbsd* | netbsdelf*-gnu)
2389
2429
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2390
2430
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2391
2431
  else
2415
2455
  lt_cv_deplibs_check_method=pass_all
2416
2456
  ;;
2417
2457
 
 
2458
rdos*)
 
2459
  lt_cv_deplibs_check_method=pass_all
 
2460
  ;;
 
2461
 
2418
2462
solaris*)
2419
2463
  lt_cv_deplibs_check_method=pass_all
2420
2464
  ;;
2467
2511
  lt_cv_path_NM="$NM"
2468
2512
else
2469
2513
  lt_nm_to_check="${ac_tool_prefix}nm"
2470
 
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
 
2514
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2471
2515
    lt_nm_to_check="$lt_nm_to_check nm"
2472
2516
  fi
2473
2517
  for lt_tmp_nm in $lt_nm_to_check; do
2683
2727
_LT_AC_TAGVAR(objext, $1)=$objext
2684
2728
 
2685
2729
# Code to be used in simple compile tests
2686
 
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2730
lt_simple_compile_test_code="int some_variable = 0;"
2687
2731
 
2688
2732
# Code to be used in simple link tests
2689
 
lt_simple_link_test_code='int main(){return(0);}\n'
 
2733
lt_simple_link_test_code='int main(){return(0);}'
2690
2734
 
2691
2735
_LT_AC_SYS_COMPILER
2692
2736
 
2788
2832
_LT_AC_TAGVAR(objext, $1)=$objext
2789
2833
 
2790
2834
# Code to be used in simple compile tests
2791
 
lt_simple_compile_test_code="int some_variable = 0;\n"
 
2835
lt_simple_compile_test_code="int some_variable = 0;"
2792
2836
 
2793
2837
# Code to be used in simple link tests
2794
 
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
 
2838
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2795
2839
 
2796
2840
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2797
2841
_LT_AC_SYS_COMPILER
2937
2981
           strings "$collect2name" | grep resolve_lib_name >/dev/null
2938
2982
        then
2939
2983
          # We have reworked collect2
2940
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2984
          :
2941
2985
        else
2942
2986
          # We have old collect2
2943
2987
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3096
3140
      case $cc_basename in
3097
3141
        xlc*)
3098
3142
         output_verbose_link_cmd='echo'
3099
 
          _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'
 
3143
          _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` $xlcverstring'
3100
3144
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3101
3145
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3102
 
          _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}'
 
3146
          _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3103
3147
          _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}'
3104
3148
          ;;
3105
3149
       *)
3133
3177
  freebsd-elf*)
3134
3178
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3135
3179
    ;;
3136
 
  freebsd* | kfreebsd*-gnu | dragonfly*)
 
3180
  freebsd* | dragonfly*)
3137
3181
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3138
3182
    # conventions
3139
3183
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3182
3226
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3183
3227
 
3184
3228
      case $host_cpu in
3185
 
      hppa*64*|ia64*)
3186
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3187
 
        ;;
 
3229
      hppa*64*|ia64*) ;;
3188
3230
      *)
3189
3231
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190
3232
        ;;
3252
3294
        ;;
3253
3295
    esac
3254
3296
    ;;
3255
 
  interix3*)
 
3297
  interix[[3-9]]*)
3256
3298
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3257
3299
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3258
3300
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3292
3334
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3293
3335
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3294
3336
    ;;
3295
 
  linux*)
 
3337
  linux* | k*bsd*-gnu)
3296
3338
    case $cc_basename in
3297
3339
      KCC*)
3298
3340
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3372
3414
        # dependencies.
3373
3415
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3374
3416
        ;;
 
3417
      *)
 
3418
        case `$CC -V 2>&1 | sed 5q` in
 
3419
        *Sun\ C*)
 
3420
          # Sun C++ 5.9
 
3421
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
3422
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3423
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 
3424
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3425
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
3426
 
 
3427
          # Not sure whether something based on
 
3428
          # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
3429
          # would be better.
 
3430
          output_verbose_link_cmd='echo'
 
3431
 
 
3432
          # Archives containing C++ object files must be created using
 
3433
          # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
3434
          # necessary to make sure instantiated templates are included
 
3435
          # in the archive.
 
3436
          _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
3437
          ;;
 
3438
        esac
 
3439
        ;;
3375
3440
    esac
3376
3441
    ;;
3377
3442
  lynxos*)
3394
3459
        ;;
3395
3460
    esac
3396
3461
    ;;
3397
 
  netbsd*)
 
3462
  netbsd* | netbsdelf*-gnu)
3398
3463
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3399
3464
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3400
3465
      wlarc=
3410
3475
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3411
3476
    ;;
3412
3477
  openbsd*)
3413
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3414
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3416
 
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417
 
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3419
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3420
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3478
    if test -f /usr/libexec/ld.so; then
 
3479
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3480
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3481
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
3482
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3483
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3484
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
3485
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3486
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3487
      fi
 
3488
      output_verbose_link_cmd='echo'
 
3489
    else
 
3490
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3421
3491
    fi
3422
 
    output_verbose_link_cmd='echo'
3423
3492
    ;;
3424
3493
  osf3*)
3425
3494
    case $cc_basename in
3581
3650
        case $host_os in
3582
3651
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3583
3652
          *)
3584
 
            # The C++ compiler is used as linker so we must use $wl
3585
 
            # flag to pass the commands to the underlying system
3586
 
            # linker. We must also pass each convience library through
3587
 
            # to the system linker between allextract/defaultextract.
3588
 
            # The C++ compiler will combine linker options so we
3589
 
            # cannot just pass the convience library names through
3590
 
            # without $wl.
 
3653
            # The compiler driver will combine and reorder linker options,
 
3654
            # but understands `-z linker_flag'.
3591
3655
            # Supported since Solaris 2.6 (maybe 2.5.1?)
3592
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
3656
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3593
3657
            ;;
3594
3658
        esac
3595
3659
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3636
3700
          fi
3637
3701
 
3638
3702
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
3703
          case $host_os in
 
3704
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
3705
          *)
 
3706
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
3707
            ;;
 
3708
          esac
3639
3709
        fi
3640
3710
        ;;
3641
3711
    esac
3879
3949
# PORTME: override above test on systems where it is broken
3880
3950
ifelse([$1],[CXX],
3881
3951
[case $host_os in
3882
 
interix3*)
 
3952
interix[[3-9]]*)
3883
3953
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3884
3954
  # hack all around it, let's just trust "g++" to DTRT.
3885
3955
  _LT_AC_TAGVAR(predep_objects,$1)=
3887
3957
  _LT_AC_TAGVAR(postdeps,$1)=
3888
3958
  ;;
3889
3959
 
 
3960
linux*)
 
3961
  case `$CC -V 2>&1 | sed 5q` in
 
3962
  *Sun\ C*)
 
3963
    # Sun C++ 5.9
 
3964
    #
 
3965
    # The more standards-conforming stlport4 library is
 
3966
    # incompatible with the Cstd library. Avoid specifying
 
3967
    # it if it's in CXXFLAGS. Ignore libCrun as
 
3968
    # -library=stlport4 depends on it.
 
3969
    case " $CXX $CXXFLAGS " in
 
3970
    *" -library=stlport4 "*)
 
3971
      solaris_use_stlport4=yes
 
3972
      ;;
 
3973
    esac
 
3974
    if test "$solaris_use_stlport4" != yes; then
 
3975
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
3976
    fi
 
3977
    ;;
 
3978
  esac
 
3979
  ;;
 
3980
 
3890
3981
solaris*)
3891
3982
  case $cc_basename in
3892
3983
  CC*)
 
3984
    # The more standards-conforming stlport4 library is
 
3985
    # incompatible with the Cstd library. Avoid specifying
 
3986
    # it if it's in CXXFLAGS. Ignore libCrun as
 
3987
    # -library=stlport4 depends on it.
 
3988
    case " $CXX $CXXFLAGS " in
 
3989
    *" -library=stlport4 "*)
 
3990
      solaris_use_stlport4=yes
 
3991
      ;;
 
3992
    esac
 
3993
 
3893
3994
    # Adding this requires a known-good setup of shared libraries for
3894
3995
    # Sun compiler versions before 5.6, else PIC objects from an old
3895
3996
    # archive will be linked into the output, leading to subtle bugs.
3896
 
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
3997
    if test "$solaris_use_stlport4" != yes; then
 
3998
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
3999
    fi
3897
4000
    ;;
3898
4001
  esac
3899
4002
  ;;
3942
4045
_LT_AC_TAGVAR(objext, $1)=$objext
3943
4046
 
3944
4047
# Code to be used in simple compile tests
3945
 
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
4048
lt_simple_compile_test_code="\
 
4049
      subroutine t
 
4050
      return
 
4051
      end
 
4052
"
3946
4053
 
3947
4054
# Code to be used in simple link tests
3948
 
lt_simple_link_test_code="      program t\n      end\n"
 
4055
lt_simple_link_test_code="\
 
4056
      program t
 
4057
      end
 
4058
"
3949
4059
 
3950
4060
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3951
4061
_LT_AC_SYS_COMPILER
4024
4134
_LT_AC_TAGVAR(objext, $1)=$objext
4025
4135
 
4026
4136
# Code to be used in simple compile tests
4027
 
lt_simple_compile_test_code="class foo {}\n"
 
4137
lt_simple_compile_test_code="class foo {}"
4028
4138
 
4029
4139
# Code to be used in simple link tests
4030
 
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
 
4140
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4031
4141
 
4032
4142
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4033
4143
_LT_AC_SYS_COMPILER
4080
4190
_LT_AC_TAGVAR(objext, $1)=$objext
4081
4191
 
4082
4192
# Code to be used in simple compile tests
4083
 
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
4193
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4084
4194
 
4085
4195
# Code to be used in simple link tests
4086
4196
lt_simple_link_test_code="$lt_simple_compile_test_code"
4169
4279
    _LT_AC_TAGVAR(module_cmds, $1) \
4170
4280
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4171
4281
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
4282
    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4172
4283
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4173
4284
    _LT_AC_TAGVAR(include_expsyms, $1); do
4174
4285
 
4215
4326
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4216
4327
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4217
4328
#
4218
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
 
4329
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4219
4330
# Free Software Foundation, Inc.
4220
4331
#
4221
4332
# This file is part of GNU Libtool:
4540
4651
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4541
4652
 
4542
4653
# Fix the shell variable \$srcfile for the compiler.
4543
 
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
4654
fix_srcfile_path=$lt_fix_srcfile_path
4544
4655
 
4545
4656
# Set to yes if exported symbols are required.
4546
4657
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4623
4734
# ---------------------------------
4624
4735
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4625
4736
[AC_REQUIRE([AC_CANONICAL_HOST])
 
4737
AC_REQUIRE([LT_AC_PROG_SED])
4626
4738
AC_REQUIRE([AC_PROG_NM])
4627
4739
AC_REQUIRE([AC_OBJEXT])
4628
4740
# Check for command to grab the raw symbol name followed by C symbol from nm.
4659
4771
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4660
4772
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4661
4773
  ;;
4662
 
linux*)
 
4774
linux* | k*bsd*-gnu)
4663
4775
  if test "$host_cpu" = ia64; then
4664
4776
    symcode='[[ABCDGIRSTW]]'
4665
4777
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4849
4961
      # like `-m68040'.
4850
4962
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4851
4963
      ;;
4852
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4964
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4853
4965
      # PIC is the default for these OSes.
4854
4966
      ;;
4855
 
    mingw* | os2* | pw32*)
 
4967
    mingw* | cygwin* | os2* | pw32*)
4856
4968
      # This hack is so that the source file can tell whether it is being
4857
4969
      # built for inclusion in a dll (and should export symbols for example).
 
4970
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4971
      # (--disable-auto-import) libraries
4858
4972
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4859
4973
      ;;
4860
4974
    darwin* | rhapsody*)
4866
4980
      # DJGPP does not support shared libraries at all
4867
4981
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4868
4982
      ;;
4869
 
    interix3*)
 
4983
    interix[[3-9]]*)
4870
4984
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4871
4985
      # Instead, we relocate shared libraries at runtime.
4872
4986
      ;;
4932
5046
            ;;
4933
5047
        esac
4934
5048
        ;;
4935
 
      freebsd* | kfreebsd*-gnu | dragonfly*)
 
5049
      freebsd* | dragonfly*)
4936
5050
        # FreeBSD uses GNU C++
4937
5051
        ;;
4938
5052
      hpux9* | hpux10* | hpux11*)
4975
5089
            ;;
4976
5090
        esac
4977
5091
        ;;
4978
 
      linux*)
 
5092
      linux* | k*bsd*-gnu)
4979
5093
        case $cc_basename in
4980
5094
          KCC*)
4981
5095
            # KAI C++ Compiler
5002
5116
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5003
5117
            ;;
5004
5118
          *)
 
5119
            case `$CC -V 2>&1 | sed 5q` in
 
5120
            *Sun\ C*)
 
5121
              # Sun C++ 5.9
 
5122
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5123
              _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5124
              _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5125
              ;;
 
5126
            esac
5005
5127
            ;;
5006
5128
        esac
5007
5129
        ;;
5018
5140
            ;;
5019
5141
        esac
5020
5142
        ;;
5021
 
      netbsd*)
 
5143
      netbsd* | netbsdelf*-gnu)
5022
5144
        ;;
5023
5145
      osf3* | osf4* | osf5*)
5024
5146
        case $cc_basename in
5122
5244
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5123
5245
      ;;
5124
5246
 
5125
 
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5247
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5126
5248
      # PIC is the default for these OSes.
5127
5249
      ;;
5128
5250
 
5129
 
    mingw* | pw32* | os2*)
 
5251
    mingw* | cygwin* | pw32* | os2*)
5130
5252
      # This hack is so that the source file can tell whether it is being
5131
5253
      # built for inclusion in a dll (and should export symbols for example).
 
5254
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5255
      # (--disable-auto-import) libraries
5132
5256
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5133
5257
      ;;
5134
5258
 
5138
5262
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5139
5263
      ;;
5140
5264
 
5141
 
    interix3*)
 
5265
    interix[[3-9]]*)
5142
5266
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5143
5267
      # Instead, we relocate shared libraries at runtime.
5144
5268
      ;;
5196
5320
       esac
5197
5321
       ;;
5198
5322
 
5199
 
    mingw* | pw32* | os2*)
 
5323
    mingw* | cygwin* | pw32* | os2*)
5200
5324
      # This hack is so that the source file can tell whether it is being
5201
5325
      # built for inclusion in a dll (and should export symbols for example).
5202
5326
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5229
5353
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5230
5354
      ;;
5231
5355
 
5232
 
    linux*)
 
5356
    linux* | k*bsd*-gnu)
5233
5357
      case $cc_basename in
5234
5358
      icc* | ecc*)
5235
5359
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5248
5372
        # All Alpha code is PIC.
5249
5373
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5250
5374
        ;;
 
5375
      *)
 
5376
        case `$CC -V 2>&1 | sed 5q` in
 
5377
        *Sun\ C*)
 
5378
          # Sun C 5.9
 
5379
          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5380
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5381
          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5382
          ;;
 
5383
        *Sun\ F*)
 
5384
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
5385
          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5386
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5387
          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
 
5388
          ;;
 
5389
        esac
 
5390
        ;;
5251
5391
      esac
5252
5392
      ;;
5253
5393
 
5257
5397
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5258
5398
      ;;
5259
5399
 
 
5400
    rdos*)
 
5401
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5402
      ;;
 
5403
 
5260
5404
    solaris*)
5261
5405
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5262
5406
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5351
5495
# ------------------------------------
5352
5496
# See if the linker supports building shared libraries.
5353
5497
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5354
 
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5498
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
5499
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5355
5500
ifelse([$1],[CXX],[
5356
5501
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5357
5502
  case $host_os in
5368
5513
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5369
5514
  ;;
5370
5515
  cygwin* | mingw*)
5371
 
    _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'
 
5516
    _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'
 
5517
  ;;
 
5518
  linux* | k*bsd*-gnu)
 
5519
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5372
5520
  ;;
5373
5521
  *)
5374
5522
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5507
5655
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5508
5656
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5509
5657
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5510
 
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
5658
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5511
5659
 
5512
5660
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5513
5661
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5525
5673
      fi
5526
5674
      ;;
5527
5675
 
5528
 
    interix3*)
 
5676
    interix[[3-9]]*)
5529
5677
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5530
5678
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5531
5679
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5540
5688
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5541
5689
      ;;
5542
5690
 
5543
 
    linux*)
 
5691
    gnu* | linux* | k*bsd*-gnu)
5544
5692
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5545
5693
        tmp_addflag=
5546
5694
        case $cc_basename,$host_cpu in
5558
5706
        ifc* | ifort*)                  # Intel Fortran compiler
5559
5707
          tmp_addflag=' -nofor_main' ;;
5560
5708
        esac
5561
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5709
        case `$CC -V 2>&1 | sed 5q` in
 
5710
        *Sun\ C*)                       # Sun C 5.9
 
5711
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5712
          tmp_sharedflag='-G' ;;
 
5713
        *Sun\ F*)                       # Sun Fortran 8.3
 
5714
          tmp_sharedflag='-G' ;;
 
5715
        *)
 
5716
          tmp_sharedflag='-shared' ;;
 
5717
        esac
 
5718
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5562
5719
 
5563
5720
        if test $supports_anon_versioning = yes; then
5564
5721
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5565
5722
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5566
5723
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5567
 
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5724
          $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5568
5725
        fi
 
5726
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5569
5727
      else
5570
5728
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5571
5729
      fi
5572
5730
      ;;
5573
5731
 
5574
 
    netbsd*)
 
5732
    netbsd* | netbsdelf*-gnu)
5575
5733
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5576
5734
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5577
5735
        wlarc=
5604
5762
 
5605
5763
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5606
5764
      case `$LD -v 2>&1` in
5607
 
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
 
5765
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5608
5766
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5609
5767
        cat <<_LT_EOF 1>&2
5610
5768
 
5723
5881
           strings "$collect2name" | grep resolve_lib_name >/dev/null
5724
5882
          then
5725
5883
          # We have reworked collect2
5726
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5884
          :
5727
5885
          else
5728
5886
          # We have old collect2
5729
5887
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5816
5974
      # The linker will automatically build a .lib file if we build a DLL.
5817
5975
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5818
5976
      # FIXME: Should let the user specify the lib program.
5819
 
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
5977
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5820
5978
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5821
5979
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5822
5980
      ;;
5858
6016
      case $cc_basename in
5859
6017
        xlc*)
5860
6018
         output_verbose_link_cmd='echo'
5861
 
         _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'
 
6019
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
5862
6020
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5863
6021
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5864
 
         _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}'
 
6022
         _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5865
6023
          _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}'
5866
6024
          ;;
5867
6025
       *)
5901
6059
      ;;
5902
6060
 
5903
6061
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5904
 
    freebsd* | kfreebsd*-gnu | dragonfly*)
 
6062
    freebsd* | dragonfly*)
5905
6063
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5906
6064
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5907
6065
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6003
6161
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6004
6162
      ;;
6005
6163
 
6006
 
    netbsd*)
 
6164
    netbsd* | netbsdelf*-gnu)
6007
6165
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6008
6166
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6009
6167
      else
6023
6181
      ;;
6024
6182
 
6025
6183
    openbsd*)
6026
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6027
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6028
 
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6029
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6030
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6031
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032
 
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6184
      if test -f /usr/libexec/ld.so; then
 
6185
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6186
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6187
        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6188
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6189
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6190
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6191
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6192
        else
 
6193
          case $host_os in
 
6194
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6195
             _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6196
             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6197
             ;;
 
6198
           *)
 
6199
             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6200
             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6201
             ;;
 
6202
          esac
 
6203
        fi
6033
6204
      else
6034
 
       case $host_os in
6035
 
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6036
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6037
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6038
 
           ;;
6039
 
         *)
6040
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6041
 
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6042
 
           ;;
6043
 
       esac
 
6205
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
6044
6206
      fi
6045
6207
      ;;
6046
6208
 
6099
6261
      case $host_os in
6100
6262
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6101
6263
      *)
6102
 
        # The compiler driver will combine linker options so we
6103
 
        # cannot just pass the convience library names through
6104
 
        # without $wl, iff we do not link with $LD.
6105
 
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
6264
        # The compiler driver will combine and reorder linker options,
 
6265
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6266
        # but is careful enough not to reorder.
6106
6267
        # Supported since Solaris 2.6 (maybe 2.5.1?)
6107
 
        case $wlarc in
6108
 
        '')
6109
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6110
 
        *)
6111
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6112
 
        esac ;;
 
6268
        if test "$GCC" = yes; then
 
6269
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6270
        else
 
6271
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6272
        fi
 
6273
        ;;
6113
6274
      esac
6114
6275
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6115
6276
      ;;
6166
6327
      fi
6167
6328
      ;;
6168
6329
 
6169
 
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
 
6330
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6170
6331
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6171
6332
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6172
6333
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6241
6402
      # to ld, don't add -lc before -lgcc.
6242
6403
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6243
6404
      $rm conftest*
6244
 
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6405
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6245
6406
 
6246
6407
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6247
6408
        soname=conftest
6344
6505
[AC_CHECK_TOOL(RC, windres, no)
6345
6506
])
6346
6507
 
 
6508
 
 
6509
# Cheap backport of AS_EXECUTABLE_P and required macros
 
6510
# from Autoconf 2.59; we should not use $as_executable_p directly.
 
6511
 
 
6512
# _AS_TEST_PREPARE
 
6513
# ----------------
 
6514
m4_ifndef([_AS_TEST_PREPARE],
 
6515
[m4_defun([_AS_TEST_PREPARE],
 
6516
[if test -x / >/dev/null 2>&1; then
 
6517
  as_executable_p='test -x'
 
6518
else
 
6519
  as_executable_p='test -f'
 
6520
fi
 
6521
])])# _AS_TEST_PREPARE
 
6522
 
 
6523
# AS_EXECUTABLE_P
 
6524
# ---------------
 
6525
# Check whether a file is executable.
 
6526
m4_ifndef([AS_EXECUTABLE_P],
 
6527
[m4_defun([AS_EXECUTABLE_P],
 
6528
[AS_REQUIRE([_AS_TEST_PREPARE])dnl
 
6529
$as_executable_p $1[]dnl
 
6530
])])# AS_EXECUTABLE_P
 
6531
 
6347
6532
# NOTE: This macro has been submitted for inclusion into   #
6348
6533
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6349
6534
#  a released version of Autoconf we should remove this    #
6364
6549
  test -z "$as_dir" && as_dir=.
6365
6550
  for lt_ac_prog in sed gsed; do
6366
6551
    for ac_exec_ext in '' $ac_executable_extensions; do
6367
 
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
6552
      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6368
6553
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6369
6554
      fi
6370
6555
    done
6371
6556
  done
6372
6557
done
 
6558
IFS=$as_save_IFS
6373
6559
lt_ac_max=0
6374
6560
lt_ac_count=0
6375
6561
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6402
6588
done
6403
6589
])
6404
6590
SED=$lt_cv_path_SED
 
6591
AC_SUBST([SED])
6405
6592
AC_MSG_RESULT([$SED])
6406
6593
])
6407
6594
 
6543
6730
 
6544
6731
_PKG_TEXT
6545
6732
])],
6546
 
                [$4])
 
6733
                [AC_MSG_RESULT([no])
 
6734
                $4])
6547
6735
elif test $pkg_failed = untried; then
6548
6736
        ifelse([$4], , [AC_MSG_FAILURE(dnl
6549
6737
[The pkg-config script could not be found or is too old.  Make sure it
6552
6740
 
6553
6741
_PKG_TEXT
6554
6742
 
6555
 
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
6743
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6556
6744
                [$4])
6557
6745
else
6558
6746
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6562
6750
fi[]dnl
6563
6751
])# PKG_CHECK_MODULES
6564
6752
 
6565
 
dnl $Id: xorg-macros.m4,v 1.8 2005/12/09 15:28:41 kem Exp $
6566
 
dnl
6567
 
dnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6568
 
dnl 
6569
 
dnl Permission to use, copy, modify, distribute, and sell this software and its
6570
 
dnl documentation for any purpose is hereby granted without fee, provided that
6571
 
dnl the above copyright notice appear in all copies and that both that
6572
 
dnl copyright notice and this permission notice appear in supporting
6573
 
dnl documentation.
6574
 
dnl 
6575
 
dnl The above copyright notice and this permission notice shall be included
6576
 
dnl in all copies or substantial portions of the Software.
6577
 
dnl 
 
6753
dnl
 
6754
dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
 
6755
dnl 
 
6756
dnl Permission is hereby granted, free of charge, to any person obtaining a
 
6757
dnl copy of this software and associated documentation files (the
 
6758
dnl "Software"), to deal in the Software without restriction, including
 
6759
dnl without limitation the rights to use, copy, modify, merge, publish,
 
6760
dnl distribute, and/or sell copies of the Software, and to permit persons
 
6761
dnl to whom the Software is furnished to do so, provided that the above
 
6762
dnl copyright notice(s) and this permission notice appear in all copies of
 
6763
dnl the Software and that both the above copyright notice(s) and this
 
6764
dnl permission notice appear in supporting documentation.
 
6765
dnl
6578
6766
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6579
6767
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6580
 
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6581
 
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6582
 
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6583
 
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6584
 
dnl OTHER DEALINGS IN THE SOFTWARE.
6585
 
dnl 
6586
 
dnl Except as contained in this notice, the name of the copyright holders shall
6587
 
dnl not be used in advertising or otherwise to promote the sale, use or
6588
 
dnl other dealings in this Software without prior written authorization
6589
 
dnl from the copyright holders.
6590
 
dnl 
 
6768
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
 
6769
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 
6770
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
 
6771
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
 
6772
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
6773
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
6774
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
6775
dnl
 
6776
dnl Except as contained in this notice, the name of a copyright holder
 
6777
dnl shall not be used in advertising or otherwise to promote the sale, use
 
6778
dnl or other dealings in this Software without prior written authorization
 
6779
dnl of the copyright holder.
 
6780
 
 
6781
# XORG_MACROS_VERSION(required-version)
 
6782
# -------------------------------------
 
6783
# Minimum version: 1.1.0
 
6784
#
 
6785
# If you're using a macro added in Version 1.1 or newer, include this in
 
6786
# your configure.ac with the minimum required version, such as:
 
6787
# XORG_MACROS_VERSION(1.1)
 
6788
#
 
6789
# To force at least a version with this macro defined, also add:
 
6790
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 
6791
#
 
6792
#
 
6793
# See the "minimum version" comment for each macro you use to see what 
 
6794
# version you require.
 
6795
AC_DEFUN([XORG_MACROS_VERSION],[
 
6796
        [XORG_MACROS_needed_version=$1
 
6797
        XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
 
6798
        XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
6799
        AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
 
6800
        [XORG_MACROS_version=1.1.5
 
6801
        XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
 
6802
        XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
6803
        if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
 
6804
                AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
 
6805
        fi
 
6806
        if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
 
6807
                AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
 
6808
        fi
 
6809
        AC_MSG_RESULT([yes, $XORG_MACROS_version])
 
6810
]) # XORG_MACROS_VERSION
6591
6811
 
6592
6812
# XORG_PROG_RAWCPP()
6593
6813
# ------------------
 
6814
# Minimum version: 1.0.0
 
6815
#
6594
6816
# Find cpp program and necessary flags for use in pre-processing text files
6595
6817
# such as man pages and config files
6596
6818
AC_DEFUN([XORG_PROG_RAWCPP],[
6633
6855
 
6634
6856
# XORG_MANPAGE_SECTIONS()
6635
6857
# -----------------------
 
6858
# Minimum version: 1.0.0
 
6859
#
6636
6860
# Determine which sections man pages go in for the different man page types
6637
6861
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
6638
6862
# Not sure if there's any better way than just hardcoding by OS name.
6642
6866
AC_REQUIRE([AC_CANONICAL_HOST])
6643
6867
 
6644
6868
if test x$APP_MAN_SUFFIX = x    ; then
6645
 
    case $host_os in
6646
 
        linux*) APP_MAN_SUFFIX=1x ;;
6647
 
        *)      APP_MAN_SUFFIX=1  ;;
6648
 
    esac
 
6869
    APP_MAN_SUFFIX=1
6649
6870
fi
6650
6871
if test x$APP_MAN_DIR = x    ; then
6651
 
    case $host_os in
6652
 
        linux*) APP_MAN_DIR='$(mandir)/man1' ;;
6653
 
        *)      APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
6654
 
    esac
 
6872
    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
6655
6873
fi
6656
6874
 
6657
6875
if test x$LIB_MAN_SUFFIX = x    ; then
6658
 
    case $host_os in
6659
 
        linux*) LIB_MAN_SUFFIX=3x ;;
6660
 
        *)      LIB_MAN_SUFFIX=3  ;;
6661
 
    esac
 
6876
    LIB_MAN_SUFFIX=3
6662
6877
fi
6663
6878
if test x$LIB_MAN_DIR = x    ; then
6664
 
    case $host_os in
6665
 
        linux*) LIB_MAN_DIR='$(mandir)/man3' ;;
6666
 
        *)      LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
6667
 
    esac
 
6879
    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
6668
6880
fi
6669
6881
 
6670
6882
if test x$FILE_MAN_SUFFIX = x    ; then
6671
6883
    case $host_os in
6672
 
        linux*)         FILE_MAN_SUFFIX=5x ;;
6673
6884
        solaris*)       FILE_MAN_SUFFIX=4  ;;
6674
6885
        *)              FILE_MAN_SUFFIX=5  ;;
6675
6886
    esac
6676
6887
fi
6677
6888
if test x$FILE_MAN_DIR = x    ; then
6678
 
    case $host_os in
6679
 
        linux*) FILE_MAN_DIR='$(mandir)/man5' ;;
6680
 
        *)      FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
6681
 
    esac
 
6889
    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
6682
6890
fi
6683
6891
 
6684
 
# In Imake's linux.cf, the misc man suffix & dir was only changed for 
6685
 
# LinuxDebian, not other Linuxes, so we leave it unchanged here
6686
6892
if test x$MISC_MAN_SUFFIX = x    ; then
6687
6893
    case $host_os in
6688
 
#       linux*)         MISC_MAN_SUFFIX=7x ;;
6689
6894
        solaris*)       MISC_MAN_SUFFIX=5  ;;
6690
6895
        *)              MISC_MAN_SUFFIX=7  ;;
6691
6896
    esac
6692
6897
fi
6693
6898
if test x$MISC_MAN_DIR = x    ; then
6694
 
    case $host_os in
6695
 
#       linux*) MISC_MAN_DIR='$(mandir)/man7' ;;
6696
 
        *)      MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
6697
 
    esac
 
6899
    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
6698
6900
fi
6699
6901
 
6700
 
# In Imake's linux.cf, the driver man suffix & dir was only changed for 
6701
 
# LinuxDebian, not other Linuxes, so we leave it unchanged here
6702
6902
if test x$DRIVER_MAN_SUFFIX = x    ; then
6703
6903
    case $host_os in
6704
 
#       linux*)         DRIVER_MAN_SUFFIX=4x ;;
6705
6904
        solaris*)       DRIVER_MAN_SUFFIX=7  ;;
6706
6905
        *)              DRIVER_MAN_SUFFIX=4  ;;
6707
6906
    esac
6708
6907
fi
6709
6908
if test x$DRIVER_MAN_DIR = x    ; then
6710
 
    case $host_os in
6711
 
#       linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;;
6712
 
        *)      DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
6713
 
    esac
 
6909
    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
6714
6910
fi
6715
6911
 
6716
6912
if test x$ADMIN_MAN_SUFFIX = x    ; then
6740
6936
 
6741
6937
# XORG_CHECK_LINUXDOC
6742
6938
# -------------------
 
6939
# Minimum version: 1.0.0
 
6940
#
6743
6941
# Defines the variable MAKE_TEXT if the necessary tools and
6744
6942
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
6745
6943
# Whether or not the necessary tools and files are found can be checked
6746
6944
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
6747
6945
AC_DEFUN([XORG_CHECK_LINUXDOC],[
6748
 
AC_CHECK_FILE(
6749
 
        [$prefix/share/X11/sgml/defs.ent], 
6750
 
        [DEFS_ENT_PATH=$prefix/share/X11/sgml],
6751
 
        [DEFS_ENT_PATH=]
6752
 
)
 
6946
XORG_SGML_PATH=$prefix/share/sgml
 
6947
HAVE_DEFS_ENT=
 
6948
 
 
6949
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
6753
6950
 
6754
6951
AC_PATH_PROG(LINUXDOC, linuxdoc)
6755
6952
AC_PATH_PROG(PS2PDF, ps2pdf)
6756
6953
 
6757
6954
AC_MSG_CHECKING([Whether to build documentation])
6758
6955
 
6759
 
if test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
 
6956
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
6760
6957
   BUILDDOC=yes
6761
6958
else
6762
6959
   BUILDDOC=no
6768
6965
 
6769
6966
AC_MSG_CHECKING([Whether to build pdf documentation])
6770
6967
 
6771
 
if test x$PS2PDF != x ; then
 
6968
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
6772
6969
   BUILDPDFDOC=yes
6773
6970
else
6774
6971
   BUILDPDFDOC=no
6778
6975
 
6779
6976
AC_MSG_RESULT([$BUILDPDFDOC])
6780
6977
 
6781
 
MAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
6782
 
MAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 
6978
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
 
6979
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
6783
6980
MAKE_PDF="$PS2PDF"
6784
 
MAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
 
6981
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
6785
6982
 
6786
6983
AC_SUBST(MAKE_TEXT)
6787
6984
AC_SUBST(MAKE_PS)
6789
6986
AC_SUBST(MAKE_HTML)
6790
6987
]) # XORG_CHECK_LINUXDOC
6791
6988
 
 
6989
# XORG_CHECK_DOCBOOK
 
6990
# -------------------
 
6991
# Minimum version: 1.0.0
 
6992
#
 
6993
# Checks for the ability to build output formats from SGML DocBook source.
 
6994
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
 
6995
# indicates whether the necessary tools and files are found and, if set,
 
6996
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
 
6997
AC_DEFUN([XORG_CHECK_DOCBOOK],[
 
6998
XORG_SGML_PATH=$prefix/share/sgml
 
6999
HAVE_DEFS_ENT=
 
7000
BUILDTXTDOC=no
 
7001
BUILDPDFDOC=no
 
7002
BUILDPSDOC=no
 
7003
BUILDHTMLDOC=no
 
7004
 
 
7005
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
7006
 
 
7007
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 
7008
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 
7009
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 
7010
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
7011
 
 
7012
AC_MSG_CHECKING([Whether to build text documentation])
 
7013
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
 
7014
   test x$BUILD_TXTDOC != xno; then
 
7015
        BUILDTXTDOC=yes
 
7016
fi
 
7017
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 
7018
AC_MSG_RESULT([$BUILDTXTDOC])
 
7019
 
 
7020
AC_MSG_CHECKING([Whether to build PDF documentation])
 
7021
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
 
7022
   test x$BUILD_PDFDOC != xno; then
 
7023
        BUILDPDFDOC=yes
 
7024
fi
 
7025
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
7026
AC_MSG_RESULT([$BUILDPDFDOC])
 
7027
 
 
7028
AC_MSG_CHECKING([Whether to build PostScript documentation])
 
7029
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
 
7030
   test x$BUILD_PSDOC != xno; then
 
7031
        BUILDPSDOC=yes
 
7032
fi
 
7033
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 
7034
AC_MSG_RESULT([$BUILDPSDOC])
 
7035
 
 
7036
AC_MSG_CHECKING([Whether to build HTML documentation])
 
7037
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
 
7038
   test x$BUILD_HTMLDOC != xno; then
 
7039
        BUILDHTMLDOC=yes
 
7040
fi
 
7041
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
 
7042
AC_MSG_RESULT([$BUILDHTMLDOC])
 
7043
 
 
7044
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
 
7045
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
 
7046
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
 
7047
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
7048
 
 
7049
AC_SUBST(MAKE_TEXT)
 
7050
AC_SUBST(MAKE_PS)
 
7051
AC_SUBST(MAKE_PDF)
 
7052
AC_SUBST(MAKE_HTML)
 
7053
]) # XORG_CHECK_DOCBOOK
 
7054
 
6792
7055
# XORG_CHECK_MALLOC_ZERO
6793
7056
# ----------------------
 
7057
# Minimum version: 1.0.0
 
7058
#
6794
7059
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
6795
7060
# malloc(0) returns NULL.  Packages should add one of these cflags to
6796
7061
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
6835
7100
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
6836
7101
]) # XORG_CHECK_MALLOC_ZERO
6837
7102
 
 
7103
# XORG_WITH_LINT()
 
7104
# ----------------
 
7105
# Minimum version: 1.1.0
 
7106
#
 
7107
# Sets up flags for source checkers such as lint and sparse if --with-lint
 
7108
# is specified.   (Use --with-lint=sparse for sparse.)
 
7109
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
 
7110
# Sets $LINT_FLAGS to flags to pass to source checker
 
7111
# Sets LINT automake conditional if enabled (default: disabled)
 
7112
#
 
7113
AC_DEFUN([XORG_WITH_LINT],[
 
7114
 
 
7115
# Allow checking code with lint, sparse, etc.
 
7116
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
 
7117
                [Use a lint-style source code checker (default: disabled)])],
 
7118
                [use_lint=$withval], [use_lint=no])
 
7119
if test "x$use_lint" = "xyes" ; then
 
7120
        LINT="lint"
 
7121
else
 
7122
        LINT="$use_lint"
 
7123
fi
 
7124
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
 
7125
    case $LINT in
 
7126
        lint|*/lint)
 
7127
            case $host_os in
 
7128
                solaris*)
 
7129
                        LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
 
7130
                        ;;
 
7131
            esac
 
7132
            ;;
 
7133
    esac
 
7134
fi
 
7135
 
 
7136
AC_SUBST(LINT)
 
7137
AC_SUBST(LINT_FLAGS)
 
7138
AM_CONDITIONAL(LINT, [test x$LINT != xno])
 
7139
 
 
7140
]) # XORG_WITH_LINT
 
7141
 
 
7142
# XORG_LINT_LIBRARY(LIBNAME)
 
7143
# --------------------------
 
7144
# Minimum version: 1.1.0
 
7145
#
 
7146
# Sets up flags for building lint libraries for checking programs that call
 
7147
# functions in the library.
 
7148
# Disabled by default, enable with --enable-lint-library
 
7149
# Sets: 
 
7150
#       @LINTLIB@               - name of lint library file to make
 
7151
#       MAKE_LINT_LIB           - automake conditional
 
7152
#
 
7153
 
 
7154
AC_DEFUN([XORG_LINT_LIBRARY],[
 
7155
AC_REQUIRE([XORG_WITH_LINT])
 
7156
# Build lint "library" for more indepth checks of programs calling this library
 
7157
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
 
7158
        [Create lint library (default: disabled)])],
 
7159
        [make_lint_lib=$enableval], [make_lint_lib=no])
 
7160
if test "x$make_lint_lib" != "xno" ; then
 
7161
        if test "x$LINT" = "xno" ; then
 
7162
                AC_MSG_ERROR([Cannot make lint library without --with-lint])
 
7163
        fi
 
7164
        if test "x$make_lint_lib" = "xyes" ; then
 
7165
                LINTLIB=llib-l$1.ln
 
7166
        else
 
7167
                LINTLIB=$make_lint_lib
 
7168
        fi
 
7169
fi
 
7170
AC_SUBST(LINTLIB)
 
7171
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
7172
 
 
7173
]) # XORG_LINT_LIBRARY
 
7174
 
6838
7175
dnl Copyright 2005 Red Hat, Inc
6839
7176
dnl 
6840
7177
dnl Permission to use, copy, modify, distribute, and sell this software and its
6913
7250
# --------------------
6914
7251
# Adds --with/without-release-string and changes the PACKAGE and
6915
7252
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
6916
 
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
 
7253
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
 
7254
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
6917
7255
 
6918
7256
AC_DEFUN([XORG_RELEASE_VERSION],[
6919
7257
        AC_ARG_WITH(release-version,
6926
7264
                PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6927
7265
                AC_MSG_NOTICE([Building with package name set to $PACKAGE])
6928
7266
        fi
 
7267
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
 
7268
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
 
7269
                [Major version of this package])
 
7270
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
 
7271
        if test "x$PVM" = "x"; then
 
7272
                PVM="0"
 
7273
        fi
 
7274
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
 
7275
                [$PVM],
 
7276
                [Minor version of this package])
 
7277
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
 
7278
        if test "x$PVP" = "x"; then
 
7279
                PVP="0"
 
7280
        fi
 
7281
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
 
7282
                [$PVP],
 
7283
                [Patch version of this package])
6929
7284
])
6930
7285
 
6931
7286
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.