bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-libdir on Darwin


From: Adriaan van Os
Subject: -libdir on Darwin
Date: Fri, 21 Sep 2007 09:43:36 +0200
User-agent: Thunderbird 1.5.0.4 (Macintosh/20060516)

In Autoconf, in lib/autoconf/general.m4, there is a code fragment that checks to "Be sure to have absolute directory names".

# Be sure to have absolute directory names.
for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
                libdir localedir mandir
do
  eval ac_val=\$$ac_var
  case $ac_val in
    [[\\/$]]* | ?:[[\\/]]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
done

Among others, libdir is checked to have an absolute directory name. However, on Darwin the -install_name of a dynamic library (or Darwin bundle file <http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ld.1.html>) can start with the '@executable_path' macro, see <http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/loading_code.html>. Therefore, the check for an absolute pathname for libdir in the above code fragment is wrong.

I suggest to
* remove libdir from the code fragment, or
* skip libdir there for Darwin targets only, or
* extend the test to allow libdir (or any path) to start with '@executable_path' or more generic with '@'.

On Mac OS X, in an application package, the -install_name of a dynamic library is typically '@executable_path/../lib' or '@executable_path/../Frameworks/.....'.

GNU libtool has the same issue, but I will report that separately.

Sincerely,

Adriaan van Os
address@hidden
<http://www.microbizz.nl/gpc.html>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]