]> git.draconx.ca Git - dxcommon.git/blobdiff - m4/exported.m4
dx_getline: Fix EOF handling in standard C fallback.
[dxcommon.git] / m4 / exported.m4
index d4a613b9c2171db134381235596f223c5f94afa1..6ac92171bd4fd8a2b60a26419b19f78ca8acef09 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2012 Nick Bowler
+dnl Copyright © 2012, 2022 Nick Bowler
 dnl
 dnl Generate the exported.sh script used to determine the exported symbols of
 dnl a (libtool) object file.  This is required by the glconfig Automake
@@ -8,9 +8,17 @@ dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
 dnl This is free software: you are free to do what the fuck you want to.
 dnl There is NO WARRANTY, to the extent permitted by law.
 
-AC_DEFUN([DX_EXPORTED_SH], [dnl
-AC_REQUIRE([DX_INIT])
+AC_DEFUN([DX_EXPORTED_SH],
+[AC_REQUIRE([DX_INIT])dnl
+AC_REQUIRE([AC_PROG_SED])dnl
+
+AC_CONFIG_COMMANDS_PRE(
+[AC_PROVIDE_IFELSE([LT_INIT], , [m4_warn([syntax],
+[$0 requires libtool.
+Consider adding an invocation of LT_INIT to configure.ac.])])
+
+GLOBAL_SYMBOL_PIPE=$lt_cv_sys_global_symbol_pipe
+AC_SUBST([GLOBAL_SYMBOL_PIPE])])
 
 AC_CONFIG_FILES([exported.sh:]DX_BASEDIR[/snippet/exported.sh.in],
-       [chmod +x exported.sh])
-])
+  [chmod +x exported.sh])])