Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
839B

  1. dnl file : m4/disable-rpath.m4
  2. dnl author : Boris Kolpackov <boris@codesynthesis.com>
  3. dnl copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
  4. dnl license : GNU GPL v2; see accompanying LICENSE file
  5. dnl
  6. AC_DEFUN([DISABLE_RPATH],[
  7. AC_MSG_CHECKING([whether to use rpath])
  8. AC_ARG_ENABLE(
  9. [rpath],
  10. [AC_HELP_STRING([--disable-rpath], [patch libtool to not use rpath])],
  11. [libtool_rpath="$enable_rpath"],
  12. [libtool_rpath="yes"])
  13. AC_MSG_RESULT($libtool_rpath)
  14. # Patch libtool to not use rpath if requested.
  15. #
  16. AC_CONFIG_COMMANDS(
  17. [libtool-rpath-patch],
  18. [if test "$libtool_use_rpath" = "no"; then
  19. sed < libtool > libtool-2 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "/'
  20. mv libtool-2 libtool
  21. chmod 755 libtool
  22. fi],
  23. [libtool_use_rpath=$libtool_rpath])
  24. ])dnl