Mercurial > audlegacy
annotate m4/libmikmod.m4 @ 439:3c43e25ddc7d trunk
[svn] Add `Apply' button to the presets window. Patch via NhJm.
author | nenolod |
---|---|
date | Sun, 15 Jan 2006 00:34:41 -0800 |
parents | 3e9ccc00d122 |
children |
rev | line source |
---|---|
32 | 1 # Configure paths for libmikmod |
2 # | |
3 # Derived from libmikmod.m4 (Owen Taylor 97-11-3) | |
4 # | |
5 | |
6 dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | |
7 dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and | |
8 dnl LIBMIKMOD_LDADD | |
9 dnl | |
164
3e9ccc00d122
[svn] Add quotes for AC_FIND_FILE to make aclocal-1.9 happy
chainsaw
parents:
132
diff
changeset
|
10 AC_DEFUN([AM_PATH_LIBMIKMOD], |
32 | 11 [dnl |
12 dnl Get the cflags and libraries from the libmikmod-config script | |
13 dnl | |
14 AC_ARG_WITH(libmikmod-prefix,[ --with-libmikmod-prefix=PFX Prefix where libmikmod is installed (optional)], | |
15 libmikmod_config_prefix="$withval", libmikmod_config_prefix="") | |
16 AC_ARG_WITH(libmikmod-exec-prefix,[ --with-libmikmod-exec-prefix=PFX Exec prefix where libmikmod is installed (optional)], | |
17 libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="") | |
18 | |
19 if test x$libmikmod_config_exec_prefix != x ; then | |
20 libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix" | |
21 if test x${LIBMIKMOD_CONFIG+set} != xset ; then | |
22 LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config | |
23 fi | |
24 fi | |
25 if test x$libmikmod_config_prefix != x ; then | |
26 libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix" | |
27 if test x${LIBMIKMOD_CONFIG+set} != xset ; then | |
28 LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config | |
29 fi | |
30 fi | |
31 | |
32 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no) | |
33 min_libmikmod_version=ifelse([$1], ,3.1.5,$1) | |
34 AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version) | |
35 no_libmikmod="" | |
36 if test "$LIBMIKMOD_CONFIG" = "no" ; then | |
37 no_libmikmod=yes | |
38 else | |
39 LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags` | |
40 LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs` | |
41 LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd` | |
42 libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
43 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` | |
44 libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
45 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` | |
46 libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
47 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` | |
48 fi | |
49 if test "x$no_libmikmod" = x ; then | |
50 AC_MSG_RESULT(yes) | |
51 ifelse([$2], , :, [$2]) | |
52 else | |
53 AC_MSG_RESULT(no) | |
54 if test "$LIBMIKMOD_CONFIG" = "no" ; then | |
55 echo "*** The libmikmod-config script installed by libmikmod could not be found" | |
56 echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in" | |
57 echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the" | |
58 echo "*** full path to libmikmod-config." | |
59 fi | |
60 LIBMIKMOD_CFLAGS="" | |
61 LIBMIKMOD_LIBS="" | |
62 LIBMIKMOD_LDADD="" | |
63 ifelse([$3], , :, [$3]) | |
64 fi | |
65 AC_SUBST(LIBMIKMOD_CFLAGS) | |
66 AC_SUBST(LIBMIKMOD_LIBS) | |
67 AC_SUBST(LIBMIKMOD_LDADD) | |
68 rm -f conf.mikmodtest | |
69 ]) | |
70 | |
164
3e9ccc00d122
[svn] Add quotes for AC_FIND_FILE to make aclocal-1.9 happy
chainsaw
parents:
132
diff
changeset
|
71 AC_DEFUN([AC_FIND_FILE], |
32 | 72 [ |
73 $3=NO | |
74 for i in $2; | |
75 do | |
76 for j in $1; | |
77 do | |
78 if test -r "$i/$j"; then | |
79 $3=$i | |
80 break 2 | |
81 fi | |
82 done | |
83 done | |
84 ] | |
85 ) | |
86 |