disable-rpath.m4 773 B

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