~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to m4/lib-link.m4

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# lib-link.m4 serial 1 (gettext-0.11)
2
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
1
# lib-link.m4 serial 4 (gettext-0.12)
 
2
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
3
3
dnl This file is free software, distributed under the terms of the GNU
4
4
dnl General Public License.  As a special exception to the GNU General
5
5
dnl Public License, this file may be distributed as part of a program
92
92
 
93
93
dnl Determine the platform dependent parameters needed to use rpath:
94
94
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
95
 
dnl hardcode_direct, hardcode_minus_L,
96
 
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
 
95
dnl hardcode_direct, hardcode_minus_L.
97
96
AC_DEFUN([AC_LIB_RPATH],
98
97
[
99
98
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
114
113
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
115
114
  hardcode_direct="$acl_cv_hardcode_direct"
116
115
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
117
 
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
118
 
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
 
116
  dnl Determine whether the user wants rpath handling at all.
 
117
  AC_ARG_ENABLE(rpath,
 
118
    [  --disable-rpath         do not hardcode runtime library paths],
 
119
    :, enable_rpath=yes)
119
120
])
120
121
 
121
122
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
131
132
    eval additional_includedir=\"$includedir\"
132
133
    eval additional_libdir=\"$libdir\"
133
134
  ])
134
 
  AC_ARG_WITH([lib$1-prefix],
 
135
  AC_LIB_ARG_WITH([lib$1-prefix],
135
136
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
136
137
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
137
138
[
245
246
              dnl Linking with a shared library. We attempt to hardcode its
246
247
              dnl directory into the executable's runpath, unless it's the
247
248
              dnl standard /usr/lib.
248
 
              if test "X$found_dir" = "X/usr/lib"; then
 
249
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
249
250
                dnl No hardcoding is needed.
250
251
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
251
252
              else
434
435
                      fi
435
436
                    fi
436
437
                    ;;
 
438
                  -R*)
 
439
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
440
                    if test "$enable_rpath" != no; then
 
441
                      dnl Potentially add DIR to rpathdirs.
 
442
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
443
                      haveit=
 
444
                      for x in $rpathdirs; do
 
445
                        if test "X$x" = "X$dir"; then
 
446
                          haveit=yes
 
447
                          break
 
448
                        fi
 
449
                      done
 
450
                      if test -z "$haveit"; then
 
451
                        rpathdirs="$rpathdirs $dir"
 
452
                      fi
 
453
                      dnl Potentially add DIR to ltrpathdirs.
 
454
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
455
                      haveit=
 
456
                      for x in $ltrpathdirs; do
 
457
                        if test "X$x" = "X$dir"; then
 
458
                          haveit=yes
 
459
                          break
 
460
                        fi
 
461
                      done
 
462
                      if test -z "$haveit"; then
 
463
                        ltrpathdirs="$ltrpathdirs $dir"
 
464
                      fi
 
465
                    fi
 
466
                    ;;
437
467
                  -l*)
438
468
                    dnl Handle this in the next round.
439
469
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`