/[cvs]/ccvs/m4/lib-link.m4
ViewVC logotype

Diff of /ccvs/m4/lib-link.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mdb, Wed Mar 23 00:04:29 2005 UTC revision 1.5 by dprice, Sun Sep 4 05:58:36 2005 UTC
# Line 1  Line 1 
1  # lib-link.m4 serial 6 (gettext-0.14.3)  # lib-link.m4 serial 7 (gettext-0.15)
2  dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.  dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3  dnl This file is free software; the Free Software Foundation  dnl This file is free software; the Free Software Foundation
4  dnl gives unlimited permission to copy and/or distribute it,  dnl gives unlimited permission to copy and/or distribute it,
# Line 126  dnl the libraries corresponding to expli Line 126  dnl the libraries corresponding to expli
126  dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.  dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
127  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
128  [  [
129      AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
130    define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],    define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
131                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
132    dnl By default, look in $includedir and $libdir.    dnl By default, look in $includedir and $libdir.
# Line 148  AC_DEFUN([AC_LIB_LINKFLAGS_BODY], Line 149  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
149          ])          ])
150        else        else
151          additional_includedir="$withval/include"          additional_includedir="$withval/include"
152          additional_libdir="$withval/lib"          additional_libdir="$withval/$acl_libdirstem"
153        fi        fi
154      fi      fi
155  ])  ])
# Line 248  AC_DEFUN([AC_LIB_LINKFLAGS_BODY], Line 249  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
249                dnl Linking with a shared library. We attempt to hardcode its                dnl Linking with a shared library. We attempt to hardcode its
250                dnl directory into the executable's runpath, unless it's the                dnl directory into the executable's runpath, unless it's the
251                dnl standard /usr/lib.                dnl standard /usr/lib.
252                if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then                if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
253                  dnl No hardcoding is needed.                  dnl No hardcoding is needed.
254                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
255                else                else
# Line 334  AC_DEFUN([AC_LIB_LINKFLAGS_BODY], Line 335  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
335              dnl Assume the include files are nearby.              dnl Assume the include files are nearby.
336              additional_includedir=              additional_includedir=
337              case "$found_dir" in              case "$found_dir" in
338                */lib | */lib/)                */$acl_libdirstem | */$acl_libdirstem/)
339                  basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`                  basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
340                  additional_includedir="$basedir/include"                  additional_includedir="$basedir/include"
341                  ;;                  ;;
342              esac              esac
# Line 396  AC_DEFUN([AC_LIB_LINKFLAGS_BODY], Line 397  AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
397                      dnl   3. if it's already present in $LDFLAGS or the already                      dnl   3. if it's already present in $LDFLAGS or the already
398                      dnl      constructed $LIBNAME,                      dnl      constructed $LIBNAME,
399                      dnl   4. if it doesn't exist as a directory.                      dnl   4. if it doesn't exist as a directory.
400                      if test "X$additional_libdir" != "X/usr/lib"; then                      if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
401                        haveit=                        haveit=
402                        if test "X$additional_libdir" = "X/usr/local/lib"; then                        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
403                          if test -n "$GCC"; then                          if test -n "$GCC"; then
404                            case $host_os in                            case $host_os in
405                              linux* | gnu* | k*bsd*-gnu) haveit=yes;;                              linux* | gnu* | k*bsd*-gnu) haveit=yes;;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26