1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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)
])
|