# 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) ])