~ubuntu-branches/ubuntu/maverick/hello/maverick

« back to all changes in this revision

Viewing changes to gnulib/m4/lib-link.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2009-08-03 23:34:18 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090803233418-e1zshrjd3oqhmrrb
Tags: 2.4-1
* New upstream release. License is now GPLv3 or later.
* Manual is included again, as it's now GFDL without invariant sections.
* Clarified manual: If more than one of the greeting options is specified
  (`-g', `-n', `-t', and their long-named equivalents), whichever comes
  last takes precedence. Closes: #457941.
* Don't pass -isp to dpkg-gencontrol, as it's deprecated. Closes: #508833.
* Changed source URL in copyright file to use http, not ftp.
* Standards-Version: 3.8.2 (no changes for this).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# lib-link.m4 serial 10 (gettext-0.16.1)
2
 
dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
 
1
# lib-link.m4 serial 16 (gettext-0.18)
 
2
dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
18
18
[
19
19
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20
20
  AC_REQUIRE([AC_LIB_RPATH])
21
 
  define([Name],[translit([$1],[./-], [___])])
22
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
23
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
21
  pushdef([Name],[translit([$1],[./-], [___])])
 
22
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
23
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
24
24
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25
25
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
26
26
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
39
39
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
40
40
  dnl results of this search when this library appears as a dependency.
41
41
  HAVE_LIB[]NAME=yes
42
 
  undefine([Name])
43
 
  undefine([NAME])
 
42
  popdef([NAME])
 
43
  popdef([Name])
44
44
])
45
45
 
46
46
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
57
57
[
58
58
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59
59
  AC_REQUIRE([AC_LIB_RPATH])
60
 
  define([Name],[translit([$1],[./-], [___])])
61
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
62
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
60
  pushdef([Name],[translit([$1],[./-], [___])])
 
61
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
62
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
63
63
 
64
64
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
65
65
  dnl accordingly.
95
95
  AC_SUBST([LIB]NAME)
96
96
  AC_SUBST([LTLIB]NAME)
97
97
  AC_SUBST([LIB]NAME[_PREFIX])
98
 
  undefine([Name])
99
 
  undefine([NAME])
 
98
  popdef([NAME])
 
99
  popdef([Name])
100
100
])
101
101
 
102
102
dnl Determine the platform dependent parameters needed to use rpath:
103
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
104
 
dnl hardcode_direct, hardcode_minus_L.
 
103
dnl   acl_libext,
 
104
dnl   acl_shlibext,
 
105
dnl   acl_hardcode_libdir_flag_spec,
 
106
dnl   acl_hardcode_libdir_separator,
 
107
dnl   acl_hardcode_direct,
 
108
dnl   acl_hardcode_minus_L.
105
109
AC_DEFUN([AC_LIB_RPATH],
106
110
[
107
111
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
118
122
    acl_cv_rpath=done
119
123
  ])
120
124
  wl="$acl_cv_wl"
121
 
  libext="$acl_cv_libext"
122
 
  shlibext="$acl_cv_shlibext"
123
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
124
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
125
 
  hardcode_direct="$acl_cv_hardcode_direct"
126
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
125
  acl_libext="$acl_cv_libext"
 
126
  acl_shlibext="$acl_cv_shlibext"
 
127
  acl_libname_spec="$acl_cv_libname_spec"
 
128
  acl_library_names_spec="$acl_cv_library_names_spec"
 
129
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
130
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
131
  acl_hardcode_direct="$acl_cv_hardcode_direct"
 
132
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
127
133
  dnl Determine whether the user wants rpath handling at all.
128
134
  AC_ARG_ENABLE(rpath,
129
135
    [  --disable-rpath         do not hardcode runtime library paths],
130
136
    :, enable_rpath=yes)
131
137
])
132
138
 
 
139
dnl AC_LIB_FROMPACKAGE(name, package)
 
140
dnl declares that libname comes from the given package. The configure file
 
141
dnl will then not have a --with-libname-prefix option but a
 
142
dnl --with-package-prefix option. Several libraries can come from the same
 
143
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
 
144
dnl macro call that searches for libname.
 
145
AC_DEFUN([AC_LIB_FROMPACKAGE],
 
146
[
 
147
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
148
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
149
  define([acl_frompackage_]NAME, [$2])
 
150
  popdef([NAME])
 
151
  pushdef([PACK],[$2])
 
152
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
153
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
154
  define([acl_libsinpackage_]PACKUP,
 
155
    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
 
156
  popdef([PACKUP])
 
157
  popdef([PACK])
 
158
])
 
159
 
133
160
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
134
161
dnl the libraries corresponding to explicit and implicit dependencies.
135
162
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
138
165
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
139
166
[
140
167
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
141
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
142
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
168
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
169
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
170
  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
 
171
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
172
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
173
  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
143
174
  dnl Autoconf >= 2.61 supports dots in --with options.
144
 
  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
 
175
  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
145
176
  dnl By default, look in $includedir and $libdir.
146
177
  use_additional=yes
147
178
  AC_LIB_WITH_FINAL_PREFIX([
148
179
    eval additional_includedir=\"$includedir\"
149
180
    eval additional_libdir=\"$libdir\"
150
181
  ])
151
 
  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
152
 
[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
153
 
  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
 
182
  AC_ARG_WITH(P_A_C_K[-prefix],
 
183
[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
 
184
  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
154
185
[
155
186
    if test "X$withval" = "Xno"; then
156
187
      use_additional=no
163
194
      else
164
195
        additional_includedir="$withval/include"
165
196
        additional_libdir="$withval/$acl_libdirstem"
 
197
        if test "$acl_libdirstem2" != "$acl_libdirstem" \
 
198
           && ! test -d "$withval/$acl_libdirstem"; then
 
199
          additional_libdir="$withval/$acl_libdirstem2"
 
200
        fi
166
201
      fi
167
202
    fi
168
203
])
211
246
          found_la=
212
247
          found_so=
213
248
          found_a=
 
249
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
 
250
          if test -n "$acl_shlibext"; then
 
251
            shrext=".$acl_shlibext"             # typically: shrext=.so
 
252
          else
 
253
            shrext=
 
254
          fi
214
255
          if test $use_additional = yes; then
215
 
            if test -n "$shlibext" \
216
 
               && { test -f "$additional_libdir/lib$name.$shlibext" \
217
 
                    || { test "$shlibext" = dll \
218
 
                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
219
 
              found_dir="$additional_libdir"
220
 
              if test -f "$additional_libdir/lib$name.$shlibext"; then
221
 
                found_so="$additional_libdir/lib$name.$shlibext"
 
256
            dir="$additional_libdir"
 
257
            dnl The same code as in the loop below:
 
258
            dnl First look for a shared library.
 
259
            if test -n "$acl_shlibext"; then
 
260
              if test -f "$dir/$libname$shrext"; then
 
261
                found_dir="$dir"
 
262
                found_so="$dir/$libname$shrext"
222
263
              else
223
 
                found_so="$additional_libdir/lib$name.dll.a"
224
 
              fi
225
 
              if test -f "$additional_libdir/lib$name.la"; then
226
 
                found_la="$additional_libdir/lib$name.la"
227
 
              fi
228
 
            else
229
 
              if test -f "$additional_libdir/lib$name.$libext"; then
230
 
                found_dir="$additional_libdir"
231
 
                found_a="$additional_libdir/lib$name.$libext"
232
 
                if test -f "$additional_libdir/lib$name.la"; then
233
 
                  found_la="$additional_libdir/lib$name.la"
 
264
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
265
                  ver=`(cd "$dir" && \
 
266
                        for f in "$libname$shrext".*; do echo "$f"; done \
 
267
                        | sed -e "s,^$libname$shrext\\\\.,," \
 
268
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
269
                        | sed 1q ) 2>/dev/null`
 
270
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
271
                    found_dir="$dir"
 
272
                    found_so="$dir/$libname$shrext.$ver"
 
273
                  fi
 
274
                else
 
275
                  eval library_names=\"$acl_library_names_spec\"
 
276
                  for f in $library_names; do
 
277
                    if test -f "$dir/$f"; then
 
278
                      found_dir="$dir"
 
279
                      found_so="$dir/$f"
 
280
                      break
 
281
                    fi
 
282
                  done
234
283
                fi
235
284
              fi
236
285
            fi
 
286
            dnl Then look for a static library.
 
287
            if test "X$found_dir" = "X"; then
 
288
              if test -f "$dir/$libname.$acl_libext"; then
 
289
                found_dir="$dir"
 
290
                found_a="$dir/$libname.$acl_libext"
 
291
              fi
 
292
            fi
 
293
            if test "X$found_dir" != "X"; then
 
294
              if test -f "$dir/$libname.la"; then
 
295
                found_la="$dir/$libname.la"
 
296
              fi
 
297
            fi
237
298
          fi
238
299
          if test "X$found_dir" = "X"; then
239
300
            for x in $LDFLAGS $LTLIB[]NAME; do
241
302
              case "$x" in
242
303
                -L*)
243
304
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
244
 
                  if test -n "$shlibext" \
245
 
                     && { test -f "$dir/lib$name.$shlibext" \
246
 
                          || { test "$shlibext" = dll \
247
 
                               && test -f "$dir/lib$name.dll.a"; }; }; then
248
 
                    found_dir="$dir"
249
 
                    if test -f "$dir/lib$name.$shlibext"; then
250
 
                      found_so="$dir/lib$name.$shlibext"
 
305
                  dnl First look for a shared library.
 
306
                  if test -n "$acl_shlibext"; then
 
307
                    if test -f "$dir/$libname$shrext"; then
 
308
                      found_dir="$dir"
 
309
                      found_so="$dir/$libname$shrext"
251
310
                    else
252
 
                      found_so="$dir/lib$name.dll.a"
253
 
                    fi
254
 
                    if test -f "$dir/lib$name.la"; then
255
 
                      found_la="$dir/lib$name.la"
256
 
                    fi
257
 
                  else
258
 
                    if test -f "$dir/lib$name.$libext"; then
259
 
                      found_dir="$dir"
260
 
                      found_a="$dir/lib$name.$libext"
261
 
                      if test -f "$dir/lib$name.la"; then
262
 
                        found_la="$dir/lib$name.la"
 
311
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
312
                        ver=`(cd "$dir" && \
 
313
                              for f in "$libname$shrext".*; do echo "$f"; done \
 
314
                              | sed -e "s,^$libname$shrext\\\\.,," \
 
315
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
316
                              | sed 1q ) 2>/dev/null`
 
317
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
318
                          found_dir="$dir"
 
319
                          found_so="$dir/$libname$shrext.$ver"
 
320
                        fi
 
321
                      else
 
322
                        eval library_names=\"$acl_library_names_spec\"
 
323
                        for f in $library_names; do
 
324
                          if test -f "$dir/$f"; then
 
325
                            found_dir="$dir"
 
326
                            found_so="$dir/$f"
 
327
                            break
 
328
                          fi
 
329
                        done
263
330
                      fi
264
331
                    fi
265
332
                  fi
 
333
                  dnl Then look for a static library.
 
334
                  if test "X$found_dir" = "X"; then
 
335
                    if test -f "$dir/$libname.$acl_libext"; then
 
336
                      found_dir="$dir"
 
337
                      found_a="$dir/$libname.$acl_libext"
 
338
                    fi
 
339
                  fi
 
340
                  if test "X$found_dir" != "X"; then
 
341
                    if test -f "$dir/$libname.la"; then
 
342
                      found_la="$dir/$libname.la"
 
343
                    fi
 
344
                  fi
266
345
                  ;;
267
346
              esac
268
347
              if test "X$found_dir" != "X"; then
277
356
              dnl Linking with a shared library. We attempt to hardcode its
278
357
              dnl directory into the executable's runpath, unless it's the
279
358
              dnl standard /usr/lib.
280
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
 
359
              if test "$enable_rpath" = no \
 
360
                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
 
361
                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
281
362
                dnl No hardcoding is needed.
282
363
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
283
364
              else
296
377
                  ltrpathdirs="$ltrpathdirs $found_dir"
297
378
                fi
298
379
                dnl The hardcoding into $LIBNAME is system dependent.
299
 
                if test "$hardcode_direct" = yes; then
 
380
                if test "$acl_hardcode_direct" = yes; then
300
381
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
301
382
                  dnl resulting binary.
302
383
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
303
384
                else
304
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
385
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
305
386
                    dnl Use an explicit option to hardcode DIR into the resulting
306
387
                    dnl binary.
307
388
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
332
413
                    if test -z "$haveit"; then
333
414
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
334
415
                    fi
335
 
                    if test "$hardcode_minus_L" != no; then
 
416
                    if test "$acl_hardcode_minus_L" != no; then
336
417
                      dnl FIXME: Not sure whether we should use
337
418
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
338
419
                      dnl here.
339
420
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
340
421
                    else
341
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
422
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
342
423
                      dnl here, because this doesn't fit in flags passed to the
343
424
                      dnl compiler. So give up. No hardcoding. This affects only
344
425
                      dnl very old systems.
368
449
                LIB[]NAME[]_PREFIX="$basedir"
369
450
                additional_includedir="$basedir/include"
370
451
                ;;
 
452
              */$acl_libdirstem2 | */$acl_libdirstem2/)
 
453
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
 
454
                LIB[]NAME[]_PREFIX="$basedir"
 
455
                additional_includedir="$basedir/include"
 
456
                ;;
371
457
            esac
372
458
            if test "X$additional_includedir" != "X"; then
373
459
              dnl Potentially add $additional_includedir to $INCNAME.
426
512
                    dnl   3. if it's already present in $LDFLAGS or the already
427
513
                    dnl      constructed $LIBNAME,
428
514
                    dnl   4. if it doesn't exist as a directory.
429
 
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
 
515
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
 
516
                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
430
517
                      haveit=
431
 
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
 
518
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
 
519
                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
432
520
                        if test -n "$GCC"; then
433
521
                          case $host_os in
434
522
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
527
615
    done
528
616
  done
529
617
  if test "X$rpathdirs" != "X"; then
530
 
    if test -n "$hardcode_libdir_separator"; then
 
618
    if test -n "$acl_hardcode_libdir_separator"; then
531
619
      dnl Weird platform: only the last -rpath option counts, the user must
532
620
      dnl pass all path elements in one option. We can arrange that for a
533
621
      dnl single library, but not when more than one $LIBNAMEs are used.
534
622
      alldirs=
535
623
      for found_dir in $rpathdirs; do
536
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
624
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
537
625
      done
538
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
626
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
539
627
      acl_save_libdir="$libdir"
540
628
      libdir="$alldirs"
541
 
      eval flag=\"$hardcode_libdir_flag_spec\"
 
629
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
542
630
      libdir="$acl_save_libdir"
543
631
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
544
632
    else
546
634
      for found_dir in $rpathdirs; do
547
635
        acl_save_libdir="$libdir"
548
636
        libdir="$found_dir"
549
 
        eval flag=\"$hardcode_libdir_flag_spec\"
 
637
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
550
638
        libdir="$acl_save_libdir"
551
639
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
552
640
      done
559
647
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
560
648
    done
561
649
  fi
 
650
  popdef([P_A_C_K])
 
651
  popdef([PACKLIBS])
 
652
  popdef([PACKUP])
 
653
  popdef([PACK])
 
654
  popdef([NAME])
562
655
])
563
656
 
564
657
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
595
688
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
596
689
  $1=
597
690
  if test "$enable_rpath" != no; then
598
 
    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
691
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
599
692
      dnl Use an explicit option to hardcode directories into the resulting
600
693
      dnl binary.
601
694
      rpathdirs=
604
697
        if test -n "$next"; then
605
698
          dir="$next"
606
699
          dnl No need to hardcode the standard /usr/lib.
607
 
          if test "X$dir" != "X/usr/$acl_libdirstem"; then
 
700
          if test "X$dir" != "X/usr/$acl_libdirstem" \
 
701
             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
608
702
            rpathdirs="$rpathdirs $dir"
609
703
          fi
610
704
          next=
613
707
            -L) next=yes ;;
614
708
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
615
709
                 dnl No need to hardcode the standard /usr/lib.
616
 
                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
 
710
                 if test "X$dir" != "X/usr/$acl_libdirstem" \
 
711
                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
617
712
                   rpathdirs="$rpathdirs $dir"
618
713
                 fi
619
714
                 next= ;;
629
724
          done
630
725
        else
631
726
          dnl The linker is used for linking directly.
632
 
          if test -n "$hardcode_libdir_separator"; then
 
727
          if test -n "$acl_hardcode_libdir_separator"; then
633
728
            dnl Weird platform: only the last -rpath option counts, the user
634
729
            dnl must pass all path elements in one option.
635
730
            alldirs=
636
731
            for dir in $rpathdirs; do
637
 
              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
 
732
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
638
733
            done
639
734
            acl_save_libdir="$libdir"
640
735
            libdir="$alldirs"
641
 
            eval flag=\"$hardcode_libdir_flag_spec\"
 
736
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
642
737
            libdir="$acl_save_libdir"
643
738
            $1="$flag"
644
739
          else
646
741
            for dir in $rpathdirs; do
647
742
              acl_save_libdir="$libdir"
648
743
              libdir="$dir"
649
 
              eval flag=\"$hardcode_libdir_flag_spec\"
 
744
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
650
745
              libdir="$acl_save_libdir"
651
746
              $1="${$1}${$1:+ }$flag"
652
747
            done