Mercurial > libpst
annotate m4/lib-prefix.m4 @ 386:f1f9920cc7b1
Add AM_GNU_GETTEXT macros
AM_ICONV relies on config.rpath and autopoint/gettextize will
only copy these in when the AM_GNU_GETTEXT macros are present.
This is needed for the next commit that deletes config.rpath since
it is cruft that should be copied in by autotools not embedded.
Run autopoint to copy in config.rpath and
leave it to automake to copy into the tarball.
author | Paul Wise <pabs3@bonedaddy.net> |
---|---|
date | Sat, 21 Dec 2019 21:25:44 +0800 |
parents | 0b1766da9be8 |
children |
rev | line source |
---|---|
153
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
1 # lib-prefix.m4 serial 6 (gettext-0.18) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
2 dnl Copyright (C) 2001-2005, 2008 Free Software Foundation, Inc. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
6 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
7 dnl From Bruno Haible. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
8 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
9 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
10 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
11 dnl require excessive bracketing. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
12 ifdef([AC_HELP_STRING], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
13 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
14 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
15 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
16 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
17 dnl to access previously installed libraries. The basic assumption is that |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
18 dnl a user will want packages to use other packages he previously installed |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
19 dnl with the same --prefix option. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
20 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
21 dnl libraries, but is otherwise very convenient. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
22 AC_DEFUN([AC_LIB_PREFIX], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
23 [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
24 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
25 AC_REQUIRE([AC_PROG_CC]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
26 AC_REQUIRE([AC_CANONICAL_HOST]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
27 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
28 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
29 dnl By default, look in $includedir and $libdir. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
30 use_additional=yes |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
31 AC_LIB_WITH_FINAL_PREFIX([ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
32 eval additional_includedir=\"$includedir\" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
33 eval additional_libdir=\"$libdir\" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
34 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
35 AC_LIB_ARG_WITH([lib-prefix], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
36 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
37 --without-lib-prefix don't search for libraries in includedir and libdir], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
38 [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
39 if test "X$withval" = "Xno"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
40 use_additional=no |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
41 else |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
42 if test "X$withval" = "X"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
43 AC_LIB_WITH_FINAL_PREFIX([ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
44 eval additional_includedir=\"$includedir\" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
45 eval additional_libdir=\"$libdir\" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
46 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
47 else |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
48 additional_includedir="$withval/include" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
49 additional_libdir="$withval/$acl_libdirstem" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
50 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
51 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
52 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
53 if test $use_additional = yes; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
54 dnl Potentially add $additional_includedir to $CPPFLAGS. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
55 dnl But don't add it |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
56 dnl 1. if it's the standard /usr/include, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
57 dnl 2. if it's already present in $CPPFLAGS, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
58 dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
59 dnl 4. if it doesn't exist as a directory. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
60 if test "X$additional_includedir" != "X/usr/include"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
61 haveit= |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
62 for x in $CPPFLAGS; do |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
63 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
64 if test "X$x" = "X-I$additional_includedir"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
65 haveit=yes |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
66 break |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
67 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
68 done |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
69 if test -z "$haveit"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
70 if test "X$additional_includedir" = "X/usr/local/include"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
71 if test -n "$GCC"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
72 case $host_os in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
73 linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
74 esac |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
75 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
76 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
77 if test -z "$haveit"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
78 if test -d "$additional_includedir"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
79 dnl Really add $additional_includedir to $CPPFLAGS. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
80 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
81 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
82 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
83 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
84 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
85 dnl Potentially add $additional_libdir to $LDFLAGS. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
86 dnl But don't add it |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
87 dnl 1. if it's the standard /usr/lib, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
88 dnl 2. if it's already present in $LDFLAGS, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
89 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
90 dnl 4. if it doesn't exist as a directory. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
91 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
92 haveit= |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
93 for x in $LDFLAGS; do |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
94 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
95 if test "X$x" = "X-L$additional_libdir"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
96 haveit=yes |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
97 break |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
98 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
99 done |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
100 if test -z "$haveit"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
101 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
102 if test -n "$GCC"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
103 case $host_os in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
104 linux*) haveit=yes;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
105 esac |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
106 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
107 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
108 if test -z "$haveit"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
109 if test -d "$additional_libdir"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
110 dnl Really add $additional_libdir to $LDFLAGS. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
111 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
112 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
113 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
114 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
115 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
116 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
117 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
118 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
119 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
120 dnl acl_final_exec_prefix, containing the values to which $prefix and |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
121 dnl $exec_prefix will expand at the end of the configure script. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
122 AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
123 [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
124 dnl Unfortunately, prefix and exec_prefix get only finally determined |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
125 dnl at the end of configure. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
126 if test "X$prefix" = "XNONE"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
127 acl_final_prefix="$ac_default_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
128 else |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
129 acl_final_prefix="$prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
130 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
131 if test "X$exec_prefix" = "XNONE"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
132 acl_final_exec_prefix='${prefix}' |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
133 else |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
134 acl_final_exec_prefix="$exec_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
135 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
136 acl_save_prefix="$prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
137 prefix="$acl_final_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
138 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
139 prefix="$acl_save_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
140 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
141 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
142 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
143 dnl variables prefix and exec_prefix bound to the values they will have |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
144 dnl at the end of the configure script. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
145 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
146 [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
147 acl_save_prefix="$prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
148 prefix="$acl_final_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
149 acl_save_exec_prefix="$exec_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
150 exec_prefix="$acl_final_exec_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
151 $1 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
152 exec_prefix="$acl_save_exec_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
153 prefix="$acl_save_prefix" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
154 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
155 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
156 dnl AC_LIB_PREPARE_MULTILIB creates |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
157 dnl - a variable acl_libdirstem, containing the basename of the libdir, either |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
158 dnl "lib" or "lib64" or "lib/64", |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
159 dnl - a variable acl_libdirstem2, as a secondary possible value for |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
160 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
161 dnl "lib/amd64". |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
162 AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
163 [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
164 dnl There is no formal standard regarding lib and lib64. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
165 dnl On glibc systems, the current practice is that on a system supporting |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
166 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
167 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
168 dnl the compiler's default mode by looking at the compiler's library search |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
169 dnl path. If at least one of its elements ends in /lib64 or points to a |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
170 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
171 dnl Otherwise we use the default, namely "lib". |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
172 dnl On Solaris systems, the current practice is that on a system supporting |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
173 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
174 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
175 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
176 AC_REQUIRE([AC_CANONICAL_HOST]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
177 acl_libdirstem=lib |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
178 acl_libdirstem2= |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
179 case "$host_os" in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
180 solaris*) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
181 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
182 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
183 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
184 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
185 dnl symlink is missing, so we set acl_libdirstem2 too. |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
186 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
187 [AC_EGREP_CPP([sixtyfour bits], [ |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
188 #ifdef _LP64 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
189 sixtyfour bits |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
190 #endif |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
191 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
192 ]) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
193 if test $gl_cv_solaris_64bit = yes; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
194 acl_libdirstem=lib/64 |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
195 case "$host_cpu" in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
196 sparc*) acl_libdirstem2=lib/sparcv9 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
197 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
198 esac |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
199 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
200 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
201 *) |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
202 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
203 if test -n "$searchpath"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
204 acl_save_IFS="${IFS= }"; IFS=":" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
205 for searchdir in $searchpath; do |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
206 if test -d "$searchdir"; then |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
207 case "$searchdir" in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
208 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
209 *) searchdir=`cd "$searchdir" && pwd` |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
210 case "$searchdir" in |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
211 */lib64 ) acl_libdirstem=lib64 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
212 esac ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
213 esac |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
214 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
215 done |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
216 IFS="$acl_save_IFS" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
217 fi |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
218 ;; |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
219 esac |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
220 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" |
0b1766da9be8
use AM_ICONV for better portability of the library location.
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
221 ]) |