pandora_libtool.m4 887 B

12345678910111213141516171819202122232425
  1. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  2. dnl This file is free software; Sun Microsystems, Inc.
  3. dnl gives unlimited permission to copy and/or distribute it,
  4. dnl with or without modifications, as long as this notice is preserved.
  5. AC_DEFUN([PANDORA_LIBTOOL],[
  6. AC_REQUIRE([AC_DISABLE_STATIC])
  7. AC_REQUIRE([AC_PROG_LIBTOOL])
  8. m4_ifndef([LT_PREREQ],[
  9. pandora_have_old_libtool=yes
  10. ],[
  11. pandora_have_old_libtool=no
  12. ])
  13. AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[
  14. PANDORA_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2])
  15. ])
  16. dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read
  17. dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT
  18. dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it.
  19. m4_ifdef([LT_LANG],[
  20. LT_LANG(C)
  21. LT_LANG(C++)
  22. ])
  23. ])