comparison m4/relocatable.m4 @ 40205:9e8fb35d4032

relocatable-prog: Revert "Use wrapper-free installation on Mac OS X." * build-aux/install-reloc: Revert change. * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
author Bruno Haible <bruno@clisp.org>
date Mon, 04 Mar 2019 17:25:04 +0100
parents 9734faea5d7b
children 770a5696761e
comparison
equal deleted inserted replaced
40204:db8428454956 40205:9e8fb35d4032
1 # relocatable.m4 serial 22 1 # relocatable.m4 serial 21
2 dnl Copyright (C) 2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. 2 dnl Copyright (C) 2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation 3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it, 4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved. 5 dnl with or without modifications, as long as this notice is preserved.
6 6
32 AC_REQUIRE([AC_LIB_LIBPATH]) 32 AC_REQUIRE([AC_LIB_LIBPATH])
33 AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) 33 AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
34 AC_REQUIRE([AC_CANONICAL_HOST]) 34 AC_REQUIRE([AC_CANONICAL_HOST])
35 is_noop=no 35 is_noop=no
36 use_elf_origin_trick=no 36 use_elf_origin_trick=no
37 use_macos_tools=no
38 use_wrapper=no 37 use_wrapper=no
39 if test $RELOCATABLE = yes; then 38 if test $RELOCATABLE = yes; then
40 # --enable-relocatable implies --disable-rpath 39 # --enable-relocatable implies --disable-rpath
41 enable_rpath=no 40 enable_rpath=no
42 AC_CHECK_HEADERS([mach-o/dyld.h]) 41 AC_CHECK_HEADERS([mach-o/dyld.h])
73 # Solaris >= 10: yes. 72 # Solaris >= 10: yes.
74 solaris | solaris2.[1-9] | solaris2.[1-9].*) ;; 73 solaris | solaris2.[1-9] | solaris2.[1-9].*) ;;
75 solaris*) use_elf_origin_trick=yes ;; 74 solaris*) use_elf_origin_trick=yes ;;
76 # Haiku: yes. 75 # Haiku: yes.
77 haiku*) use_elf_origin_trick=yes ;; 76 haiku*) use_elf_origin_trick=yes ;;
78 # On Mac OS X 10.4 or newer, use Mac OS X tools. See
79 # <https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath>.
80 darwin | darwin[1-7].*) ;;
81 darwin*) use_macos_tools=yes ;;
82 changequote([,])dnl 77 changequote([,])dnl
83 esac 78 esac
84 if test $is_noop = yes; then 79 if test $is_noop = yes; then
85 RELOCATABLE_LDFLAGS=: 80 RELOCATABLE_LDFLAGS=:
86 AC_SUBST([RELOCATABLE_LDFLAGS]) 81 AC_SUBST([RELOCATABLE_LDFLAGS])
92 *) reloc_ldflags="\$(top_builddir)/$ac_aux_dir/reloc-ldflags" ;; 87 *) reloc_ldflags="\$(top_builddir)/$ac_aux_dir/reloc-ldflags" ;;
93 esac 88 esac
94 RELOCATABLE_LDFLAGS="\"$reloc_ldflags\" \"\$(host)\" \"\$(RELOCATABLE_LIBRARY_PATH)\"" 89 RELOCATABLE_LDFLAGS="\"$reloc_ldflags\" \"\$(host)\" \"\$(RELOCATABLE_LIBRARY_PATH)\""
95 AC_SUBST([RELOCATABLE_LDFLAGS]) 90 AC_SUBST([RELOCATABLE_LDFLAGS])
96 else 91 else
92 use_wrapper=yes
97 dnl Unfortunately we cannot define INSTALL_PROGRAM to a command 93 dnl Unfortunately we cannot define INSTALL_PROGRAM to a command
98 dnl consisting of more than one word - libtool doesn't support this. 94 dnl consisting of more than one word - libtool doesn't support this.
99 dnl So we abuse the INSTALL_PROGRAM_ENV hook, originally meant for the 95 dnl So we abuse the INSTALL_PROGRAM_ENV hook, originally meant for the
100 dnl 'install-strip' target. 96 dnl 'install-strip' target.
101 if test $use_macos_tools = yes; then 97 INSTALL_PROGRAM_ENV="RELOC_LIBRARY_PATH_VAR=\"$shlibpath_var\" RELOC_LIBRARY_PATH_VALUE=\"\$(RELOCATABLE_LIBRARY_PATH)\" RELOC_PREFIX=\"\$(prefix)\" RELOC_DESTDIR=\"\$(DESTDIR)\" RELOC_COMPILE_COMMAND=\"\$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(LDFLAGS)\" RELOC_SRCDIR=\"\$(RELOCATABLE_SRC_DIR)\" RELOC_BUILDDIR=\"\$(RELOCATABLE_BUILD_DIR)\" RELOC_CONFIG_H_DIR=\"\$(RELOCATABLE_CONFIG_H_DIR)\" RELOC_EXEEXT=\"\$(EXEEXT)\" RELOC_STRIP_PROG=\"\$(RELOCATABLE_STRIP)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\""
102 INSTALL_PROGRAM_ENV="RELOC_MODE=macosx RELOC_PREFIX=\"\$(prefix)\" RELOC_DESTDIR=\"\$(DESTDIR)\" RELOC_STRIP_PROG=\"\$(RELOCATABLE_STRIP)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\""
103 else
104 use_wrapper=yes
105 INSTALL_PROGRAM_ENV="RELOC_MODE=wrapper RELOC_LIBRARY_PATH_VAR=\"$shlibpath_var\" RELOC_LIBRARY_PATH_VALUE=\"\$(RELOCATABLE_LIBRARY_PATH)\" RELOC_PREFIX=\"\$(prefix)\" RELOC_DESTDIR=\"\$(DESTDIR)\" RELOC_COMPILE_COMMAND=\"\$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(LDFLAGS)\" RELOC_SRCDIR=\"\$(RELOCATABLE_SRC_DIR)\" RELOC_BUILDDIR=\"\$(RELOCATABLE_BUILD_DIR)\" RELOC_CONFIG_H_DIR=\"\$(RELOCATABLE_CONFIG_H_DIR)\" RELOC_EXEEXT=\"\$(EXEEXT)\" RELOC_STRIP_PROG=\"\$(RELOCATABLE_STRIP)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\""
106 fi
107 AC_SUBST([INSTALL_PROGRAM_ENV]) 98 AC_SUBST([INSTALL_PROGRAM_ENV])
108 case "$ac_aux_dir" in 99 case "$ac_aux_dir" in
109 /*) INSTALL_PROGRAM="$ac_aux_dir/install-reloc" ;; 100 /*) INSTALL_PROGRAM="$ac_aux_dir/install-reloc" ;;
110 *) INSTALL_PROGRAM="\$(top_builddir)/$ac_aux_dir/install-reloc" ;; 101 *) INSTALL_PROGRAM="\$(top_builddir)/$ac_aux_dir/install-reloc" ;;
111 esac 102 esac