annotate m4/libmikmod.m4 @ 2009:8121e0180670 trunk

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