From 100da29601f0ed1923ca3d6a1db3142929321f38 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 3 Apr 2003 16:22:34 +0000 Subject: autoconf stuff --- mogltk.m4 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 mogltk.m4 (limited to 'mogltk.m4') diff --git a/mogltk.m4 b/mogltk.m4 new file mode 100644 index 0000000..7364c90 --- /dev/null +++ b/mogltk.m4 @@ -0,0 +1,54 @@ +# Configure paths for mogltk +# 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 MOGLTK, and define MOGLTK_CFLAGS and MOGLTK_LIBS +dnl +AC_DEFUN(AM_PATH_MOGLTK, +[dnl +dnl Get the cflags and libraries from the mogltk-config script +dnl +AC_ARG_WITH(mogltk-prefix,[ --with-mogltk-prefix=PFX Prefix where Baltisot is installed (optional)], + mogltk_prefix="$withval", mogltk_prefix="") +AC_ARG_WITH(mogltk-exec-prefix,[ --with-mogltk-exec-prefix=PFX Exec prefix where Baltisot is installed (optional)], + mogltk_exec_prefix="$withval", mogltk_exec_prefix="") + + if test x$mogltk_exec_prefix != x ; then + mogltk_args="$mogltk_args --exec-prefix=$mogltk_exec_prefix" + if test x${mogltk_CONFIG+set} != xset ; then + mogltk_CONFIG=$mogltk_exec_prefix/bin/mogltk-config + fi + fi + if test x$mogltk_prefix != x ; then + mogltk_args="$mogltk_args --prefix=$mogltk_prefix" + if test x${mogltk_CONFIG+set} != xset ; then + mogltk_CONFIG=$mogltk_prefix/bin/mogltk-config + fi + fi + + AC_REQUIRE([AC_CANONICAL_TARGET]) + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + AC_PATH_PROG(MOGLTK_CONFIG, mogltk-config, no, [$PATH]) + no_mogltk="" + if test "$MOGLTK_CONFIG" = "no" ; then + no_mogltk=yes + else + MOGLTK_CFLAGS=`$MOGLTK_CONFIG $mogltkconf_args --cflags` + MOGLTK_LIBS=`$MOGLTK_CONFIG $mogltkconf_args --libs` + fi + + if test "x$no_mogltk" = x ; then + ifelse([$1], , :, [$1]) + else + MOGLTK_CFLAGS="" + MOGLTK_LIBS="" + ifelse([$2], , :, [$2]) + fi + AC_SUBST(MOGLTK_CFLAGS) + AC_SUBST(MOGLTK_LIBS) +]) -- cgit v1.2.3