summaryrefslogtreecommitdiff
path: root/baltisot.m4
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-06 18:56:46 +0000
committerpixel <pixel>2002-12-06 18:56:46 +0000
commit99447043a97d4b54cfdf3c44d5866a5d59268c43 (patch)
treed757ccfc7d3c4a7b22343fe3ff0ee5eb6f0d626c /baltisot.m4
parente3e6c1d7688b350046fe3fe7c862f3b3a8c879c9 (diff)
Commit of the day.
Diffstat (limited to 'baltisot.m4')
-rw-r--r--baltisot.m454
1 files changed, 54 insertions, 0 deletions
diff --git a/baltisot.m4 b/baltisot.m4
new file mode 100644
index 0000000..320e194
--- /dev/null
+++ b/baltisot.m4
@@ -0,0 +1,54 @@
+# Configure paths for Baltisot
+# Nicolas Noble 2002-12-06
+# stolen from Sam Lantinga
+# stolen from Manish Singh
+# stolen back from Frank Belew
+# stolen from Manish Singh
+# Shamelessly stolen from Owen Taylor
+
+dnl AM_PATH_SDL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for BALTISOT, and define BALTISOT_CFLAGS and BALTISOT_LIBS
+dnl
+AC_DEFUN(AM_PATH_BALTISOT,
+[dnl
+dnl Get the cflags and libraries from the baltisot-config script
+dnl
+AC_ARG_WITH(baltisot-prefix,[ --with-baltisot-prefix=PFX Prefix where Baltisot is installed (optional)],
+ baltisot_prefix="$withval", baltisot_prefix="")
+AC_ARG_WITH(baltisot-exec-prefix,[ --with-baltisot-exec-prefix=PFX Exec prefix where Baltisot is installed (optional)],
+ baltisot_exec_prefix="$withval", baltisot_exec_prefix="")
+
+ if test x$baltisot_exec_prefix != x ; then
+ baltisot_args="$baltisot_args --exec-prefix=$baltisot_exec_prefix"
+ if test x${baltisot_CONFIG+set} != xset ; then
+ baltisot_CONFIG=$baltisot_exec_prefix/bin/baltisot-config
+ fi
+ fi
+ if test x$baltisot_prefix != x ; then
+ baltisot_args="$baltisot_args --prefix=$baltisot_prefix"
+ if test x${baltisot_CONFIG+set} != xset ; then
+ baltisot_CONFIG=$baltisot_prefix/bin/baltisot-config
+ fi
+ fi
+
+ AC_REQUIRE([AC_CANONICAL_TARGET])
+ PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+ AC_PATH_PROG(BALTISOT_CONFIG, baltisot-config, no, [$PATH])
+ no_baltisot=""
+ if test "$BALTISOT_CONFIG" = "no" ; then
+ no_baltisot=yes
+ else
+ BALTISOT_CFLAGS=`$BALTISOT_CONFIG $baltisotconf_args --cflags`
+ BALTISOT_LIBS=`$BALTISOT_CONFIG $baltisotconf_args --libs`
+ fi
+
+ if test "x$no_baltisot" = x ; then
+ ifelse([$1], , :, [$1])
+ else
+ BALTISOT_CFLAGS=""
+ BALTISOT_LIBS=""
+ ifelse([$2], , :, [$2])
+ fi
+ AC_SUBST(BALTISOT_CFLAGS)
+ AC_SUBST(BALTISOT_LIBS)
+])