m4: remove some unused .m4 files

This commit is contained in:
Tim-Philipp Müller 2010-03-16 20:05:43 +00:00
parent 420d7b111d
commit cb8d01ab66
18 changed files with 0 additions and 2382 deletions

View file

@ -1,36 +1,19 @@
EXTRA_DIST = \
a52.m4 \
aalib.m4 \
as-arts.m4 \
as-ffmpeg.m4 \
as-liblame.m4 \
as-slurp-ffmpeg.m4 \
check-libheader.m4 \
codeset.m4 \
esd.m4 \
freetype2.m4 \
gconf-2.m4 \
gettext.m4 \
glibc21.m4 \
glib.m4 \
gst-alsa.m4 \
gst-artsc.m4 \
gst-fionread.m4 \
gst-ivorbis.m4 \
gst-matroska.m4 \
gst-sdl.m4 \
gst-shout2.m4 \
gst-sid.m4 \
gtk.m4 \
iconv.m4 \
intdiv0.m4 \
inttypes_h.m4 \
inttypes-pri.m4 \
lcmessage.m4 \
libfame.m4 \
lib-ld.m4 \
lib-link.m4 \
libmikmod.m4 \
lib-prefix.m4 \
lrintf.m4 \
lrint.m4 \

125
m4/a52.m4
View file

@ -1,125 +0,0 @@
dnl
dnl A52_CHECK-LIBHEADER(FEATURE-NAME, LIB-NAME, LIB-FUNCTION, HEADER-NAME,
dnl ACTION-IF-FOUND, ACTION-IF-NOT-FOUND,
dnl EXTRA-LDFLAGS, EXTRA-CPPFLAGS)
dnl
dnl FEATURE-NAME - feature name; library and header files are treated
dnl as feature, which we look for
dnl LIB-NAME - library name as in AC_CHECK_LIB macro
dnl LIB-FUNCTION - library symbol as in AC_CHECK_LIB macro
dnl HEADER-NAME - header file name as in AC_CHECK_HEADER
dnl ACTION-IF-FOUND - when feature is found then execute given action
dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action
dnl EXTRA-LDFLAGS - extra linker flags (-L or -l)
dnl EXTRA-CPPFLAGS - extra C preprocessor flags, i.e. -I/usr/X11R6/include
dnl
dnl Based on GST_CHECK_LIBHEADER from gstreamer plugins 0.3.1.
dnl
AC_DEFUN([A52_CHECK_LIBHEADER],
[
AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no, [$7])
check_libheader_feature_name=translit([$1], A-Z, a-z)
if test "x$HAVE_[$1]" = "xyes"; then
check_libheader_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="[$8] $CPPFLAGS"
AC_CHECK_HEADER([$4], :, HAVE_[$1]=no)
CPPFLAGS=$check_libheader_save_CPPFLAGS
fi
if test "x$HAVE_[$1]" = "xyes"; then
ifelse([$5], , :, [$5])
else
ifelse([$6], , :, [$6])
fi
]
)
dnl
dnl AC_CHECK_A52DEC(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
dnl
dnl ACTION-IF-FOUND - when feature is found then execute given action
dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action
dnl
dnl Defines HAVE_A52DEC to yes if liba52 is found
dnl
dnl CFLAGS and LDFLAGS for the library are stored in A52DEC_CFLAGS and
dnl A52DEC_LIBS, respectively
dnl
dnl Based on GST_CHECK_A52DEC from gstreamer plugins 0.3.3.1
dnl Thomas Vander Stichele <thomas@apestaart.org>, Andy Wingo <wingo@pobox.com>
dnl
AC_DEFUN([AC_CHECK_A52DEC],
[dnl
AC_ARG_WITH(a52dec-prefix,
AC_HELP_STRING([--with-a52dec-prefix=PFX],
[prefix where a52dec is installed (optional)]),
a52dec_config_prefix="$withval", a52dec_config_prefix="")
if test x$a52dec_config_prefix = x ; then
A52_CHECK_LIBHEADER(A52DEC, a52, a52_init, a52dec/a52.h,
A52DEC_LIBS="-la52 -lm", , -lm)
else
A52_CHECK_LIBHEADER(A52DEC, a52, a52_init, a52dec/a52.h, [
A52DEC_LIBS="-la52 -L$a52dec_config_prefix/lib -lm"
A52DEC_CFLAGS="-I$a52dec_config_prefix/include"
], , -L$a52dec_config_prefix/lib, -I$a52dec_config_prefix/include)
fi
if test $HAVE_A52DEC = "yes"; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $A52DEC_CFLAGS"
LIBS="$A52DEC_LIBS $LIBS"
AC_TRY_RUN([
#include <inttypes.h>
#include <a52dec/a52.h>
int
main ()
{
a52_state_t *state;
state = a52_init (0);
a52_free (state);
return 0;
}
],, HAVE_A52DEC=no, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
if test HAVE_A52DEC = "no"; then
echo "*** Your a52dec is borked somehow. Please update to 0.7.4."
else
AC_TRY_RUN([
#include <inttypes.h>
#include <a52dec/a52.h>
int
main ()
{
int i = sizeof (a52_state_t);
if ( i )
return 0;
}
], HAVE_A52DEC=no,, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
if test HAVE_A52DEC = "no"; then
echo "*** Your a52dec is too old. Please update to 0.7.4."
fi
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test HAVE_A52DEC = "no"; then
A52DEC_CFLAGS=""
A52DEC_LIBS=""
fi
if test "x$HAVE_A52DEC" = "xyes"; then
ifelse([$1], , :, [$1])
else
ifelse([$2], , :, [$2])
fi
AC_SUBST(A52DEC_CFLAGS)
AC_SUBST(A52DEC_LIBS)
])

View file

@ -1,178 +0,0 @@
# Configure paths for AALIB
# touched up for clean output by Thomas Vander Stichele
# Jan Hubicka 4/22/2001
# stolen from Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
dnl
AC_DEFUN([AM_PATH_AALIB],
[dnl
dnl Get the cflags and libraries from the aalib-config script
dnl
AC_ARG_WITH(aalib-prefix,
AC_HELP_STRING([--with-aalib-prefix=PFX],
[prefix where AALIB is installed (optional)]),
aalib_prefix="$withval", aalib_prefix="")
AC_ARG_WITH(aalib-exec-prefix,
AC_HELP_STRING([--with-aalib-exec-prefix=PFX],
[exec prefix where AALIB is installed (optional)]),
aalib_exec_prefix="$withval", aalib_exec_prefix="")
AC_ARG_ENABLE(aalibtest,
AC_HELP_STRING([--disable-aalibtest],
[do not try to compile and run a test AALIB program]),
, enable_aalibtest=yes)
if test x$aalib_exec_prefix != x ; then
aalib_args="$aalib_args --exec-prefix=$aalib_exec_prefix"
if test x${AALIB_CONFIG+set} != xset ; then
AALIB_CONFIG=$aalib_exec_prefix/bin/aalib-config
fi
fi
if test x$aalib_prefix != x ; then
aalib_args="$aalib_args --prefix=$aalib_prefix"
if test x${AALIB_CONFIG+set} != xset ; then
AALIB_CONFIG=$aalib_prefix/bin/aalib-config
fi
fi
AC_PATH_PROG(AALIB_CONFIG, aalib-config, no)
min_aalib_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for AALIB - version >= $min_aalib_version)
no_aalib=""
if test "$AALIB_CONFIG" = "no" ; then
no_aalib=yes
else
AALIB_CFLAGS=`$AALIB_CONFIG $aalibconf_args --cflags`
AALIB_LIBS=`$AALIB_CONFIG $aalibconf_args --libs`
aalib_major_version=`$AALIB_CONFIG $aalib_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
aalib_minor_version=`$AALIB_CONFIG $aalib_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
aalib_micro_version=`$AALIB_CONFIG $aalib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_aalibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $AALIB_CFLAGS"
LIBS="$LIBS $AALIB_LIBS"
dnl
dnl Now check if the installed AALIB is sufficiently new. (Also sanity
dnl checks the results of aalib-config to some extent
dnl
rm -f conf.aalibtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aalib.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.aalibtest");
*/
{ FILE *fp = fopen("conf.aalibtest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_aalib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_aalib_version");
exit(1);
}
if (($aalib_major_version > major) ||
(($aalib_major_version == major) && ($aalib_minor_version > minor)) ||
(($aalib_major_version == major) && ($aalib_minor_version == minor) && ($aalib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'aalib-config --version' returned %d.%d.%d, but the minimum version\n", $aalib_major_version, $aalib_minor_version, $aalib_micro_version);
printf("*** of AALIB required is %d.%d.%d. If aalib-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If aalib-config was wrong, set the environment variable AALIB_CONFIG\n");
printf("*** to point to the correct copy of aalib-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_aalib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_aalib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$AALIB_CONFIG" = "no" ; then
echo "*** The aalib-config script installed by AALIB could not be found"
echo "*** If AALIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the AALIB_CONFIG environment variable to the"
echo "*** full path to aalib-config."
else
if test -f conf.aalibtest ; then
:
else
echo "*** Could not run AALIB test program, checking why..."
CFLAGS="$CFLAGS $AALIB_CFLAGS"
LIBS="$LIBS $AALIB_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "AALIB.h"
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding AALIB or finding the wrong"
echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means AALIB was incorrectly installed"
echo "*** or that you have moved AALIB since it was installed. In the latter case, you"
echo "*** may want to edit the aalib-config script: $AALIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
AALIB_CFLAGS=""
AALIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(AALIB_CFLAGS)
AC_SUBST(AALIB_LIBS)
rm -f conf.aalibtest
])

View file

@ -1,209 +0,0 @@
dnl as-arts.m4 0.1.0
dnl $Id: as-arts.m4,v 1.5 2004/05/21 11:20:49 thomasvs Exp $
dnl if you copy this file to your cvs,
dnl add this file using cvs -ko add to retain this header
dnl This is an example arts .m4 adapted and scrubbed by thomasvs
# Configure paths for ARTS
# Philip Stadermann 2001-06-21
# stolen from esd.m4
dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ARTS, and define ARTS_CXXFLAGS and ARTS_LIBS
dnl
AC_DEFUN([AM_PATH_ARTS],
[dnl
dnl Get the cflags and libraries from the artsc-config script
dnl
AC_ARG_WITH(arts-prefix,
AC_HELP_STRING([--with-arts-prefix=PFX],
[prefix where ARTS is installed (optional)]),
arts_prefix="$withval", arts_prefix="")
AC_ARG_WITH(arts-exec-prefix,
AC_HELP_STRING([--with-arts-exec-prefix=PFX],
[exec prefix where ARTS is installed (optional)]),
arts_exec_prefix="$withval", arts_exec_prefix="")
AC_ARG_ENABLE(artstest,
AC_HELP_STRING([--disable-artstest],
[do not try to compile and run a test ARTS program]),
, enable_artstest=yes)
if test x$arts_exec_prefix != x ; then
arts_args="$arts_args --exec-prefix=$arts_exec_prefix"
if test x${ARTS_CONFIG+set} != xset ; then
ARTS_CONFIG=$arts_exec_prefix/bin/artsc-config
fi
fi
if test x$arts_prefix != x ; then
arts_args="$arts_args --prefix=$arts_prefix"
if test x${ARTS_CONFIG+set} != xset ; then
ARTS_CONFIG=$arts_prefix/bin/artsc-config
fi
fi
AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
min_arts_version=ifelse([$1], ,0.9.5,$1)
AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version)
no_arts=""
if test "$ARTS_CONFIG" = "no" ; then
no_arts=yes
else
# FIXME: thomas added this sed to get arts path instead of artsc
# replace -I.../artsc with -I.../arts
ARTS_CXXFLAGS=`$ARTS_CONFIG $artsconf_args --cflags | artsc-config --cflags | sed 's/\(-I.*\)artsc/\1arts/'`
ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs | sed 's/artsc$/arts/'`
arts_major_version=`$ARTS_CONFIG $arts_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
arts_minor_version=`$ARTS_CONFIG $arts_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_artstest" = "xyes" ; then
dnl ac_save_CXXFLAGS="$CXXFLAGS"
dnl ac_save_LIBS="$LIBS"
dnl CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
dnl LIBS="$LIBS $ARTS_LIBS"
dnl
dnl Now check if the installed ARTS is sufficiently new. (Also sanity
dnl checks the results of artsc-config to some extent)
dnl
dnl a*s: to successfully compile the C++ test app, we need to
dnl first make sure we're going to compile it as C++ (with AC_LANG_PUSH),
dnl then add the CFLAGS and CLIBS of arts which we just discovered to the
dnl C++ compilation and linking flags.
dnl We also need to clean up after the test; this means using AC_LANG_POP
dnl and restoring the CPPFLAGS and LDFLAGS from the saved values we take
dnl here.
dnl ask nicely for C++ compilation
AC_LANG_PUSH(C++)
dnl save compilation and link flags and make our own
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
AC_SUBST(CPPFLAGS,"$CPPFLAGS $ARTS_CXXFLAGS")
AC_SUBST(LDFLAGS,"$LDFLAGS $ARTS_CLIBS")
rm -f conf.artstest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <artsflow.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
// thomas: the original test did not have the typecast
new_str = (char *) malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.artstest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_arts_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_arts_version");
exit(1);
}
if (($arts_major_version > major) ||
(($arts_major_version == major) && ($arts_minor_version > minor)) ||
(($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);
printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");
printf("*** to point to the correct copy of artsc-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_arts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
dnl CFLAGS="$ac_save_CFLAGS"
dnl LIBS="$ac_save_LIBS"
dnl a*s this is were we clean up after the test
AC_LANG_POP(C++)
CXXFLAGS="$ac_save_CXXFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
dnl a*s we are sure that these are right, so we make them active
AC_SUBST(CXXFLAGS,"$CXXFLAGS")
AC_SUBST(LDFLAGS,"$LDFLAGS")
fi
fi
if test "x$no_arts" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ARTS_CONFIG" = "no" ; then
echo "*** The artsc-config script installed by ARTS could not be found"
echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ARTS_CONFIG environment variable to the"
echo "*** full path to artsc-config."
else
if test -f conf.artstest ; then
:
else
echo "*** Could not run ARTS test program, checking why..."
CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
LIBS="$LIBS $ARTS_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <artsflow.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding ARTS or finding the wrong"
echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
ARTS_CXXFLAGS=""
ARTS_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ARTS_CXXFLAGS)
AC_SUBST(ARTS_LIBS)
rm -f conf.artstest
])
dnl release C++ question

View file

@ -1,99 +0,0 @@
# CFLAGS and library paths for FFMPEG
# taken from Autostar Sandbox, http://autostars.sourceforge.net/
dnl Usage:
dnl AM_PATH_FFMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl FIXME: version checking does not work currently
dnl
dnl Example:
dnl AM_PATH_FFMPEG(0.4.6, , AC_MSG_ERROR([*** FFMPEG >= 0.4.6 not installed))
dnl
dnl Defines FFMPEG_LIBS
dnl FIXME: should define FFMPEG_VERSION
dnl
AC_DEFUN([AM_PATH_FFMPEG],
[
dnl allow for specification of a source path (for uninstalled)
AC_ARG_WITH(ffmpeg-source,
AC_HELP_STRING([--with-ffmpeg-source=DIR],
[Directory where FFmpeg source is (optional)]),
ffmpeg_source="$withval")
dnl save CFLAGS and LIBS here
CFLAGS_save=$CFLAGS
LIBS_save=$LIBS
if test "x$ffmpeg_source" != "x"; then
dnl uninstalled FFmpeg copy
AC_MSG_NOTICE([Looking for FFmpeg source in $ffmpeg_source])
CFLAGS="-I$ffmpeg_source/libav -I$ffmpeg_source/libavcodec"
LIBS="-L$ffmpeg_source/libav -L$ffmpeg_source/libavcodec"
AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
[defined if we compile against uninstalled FFmpeg])
FFMPEG_COMMON_INCLUDE="#include <common.h>"
else
FFMPEG_COMMON_INCLUDE="#include <ffmpeg/common.h>"
fi
dnl check for libavcodec
AC_CHECK_LIB(avcodec, avcodec_init, HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
dnl check for avcodec.h and avformat.h
if test "x$ffmpeg_source" != "x"; then
dnl uninstalled
AC_CHECK_HEADER(avcodec.h, , HAVE_FFMPEG=no, [/* only compile */])
AC_CHECK_HEADER(avformat.h, , HAVE_FFMPEG=no, [/* only compile */])
else
AC_CHECK_HEADER(ffmpeg/avcodec.h, , HAVE_FFMPEG=no)
AC_CHECK_HEADER(ffmpeg/avformat.h, , HAVE_FFMPEG=no)
fi
dnl now check if it's sufficiently new
AC_LANG_SAVE()
AC_LANG_C()
dnl FIXME: we use strcmp, which we know is going to break if ffmpeg ever uses
dnl two digits for any of their version numbers. It makes the test so much
dnl easier though so let's ignore that
AC_TRY_RUN([
$FFMPEG_COMMON_INCLUDE
#include <stdio.h>
#include <string.h>
int
main ()
{
if (strcmp (FFMPEG_VERSION, "$1") == -1)
{
fprintf (stderr,
"ERROR: your copy of ffmpeg is too old (%s)\n", FFMPEG_VERSION);
return 1;
}
else
return 0;
}
], , HAVE_FFMPEG=no)
dnl now do the actual "do we have it ?" test
if test "x$HAVE_FFMPEG" = "xyes"; then
FFMPEG_LIBS="$LIBS -lavcodec -lavformat"
FFMPEG_CFLAGS="$CFLAGS"
AC_MSG_NOTICE(we have ffmpeg)
dnl execute what we have to because it's found
ifelse([$2], , :, [$2])
else
FFMPEG_LIBS=""
FFMPEG_CFLAGS=""
dnl execute what we have to because it's not found
ifelse([$3], , :, [$3])
fi
dnl make variables available
AC_SUBST(FFMPEG_LIBS)
AC_SUBST(FFMPEG_CFLAGS)
AC_SUBST(HAVE_FFMPEG)
AC_LANG_RESTORE()
CFLAGS=$CFLAGS_save
LIBS=$LIBS_save
])

View file

@ -1,50 +0,0 @@
# CFLAGS and library paths for LIBLAME
# taken from Autostar Sandbox, http://autostars.sourceforge.net/
# inspired by xmms.m4
dnl Usage:
dnl AM_PATH_LIBLAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl FIXME: version checking does not work currently
dnl
dnl Example:
dnl AM_PATH_LIBLAME(3.89, , AC_MSG_ERROR([*** LIBLAME >= 3.89 not installed))
dnl
dnl Defines LIBLAME_LIBS
dnl FIXME: should define LIBLAME_VERSION
dnl
AC_DEFUN([AM_PATH_LIBLAME],
[
dnl check for the library
AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
dnl check if lame.h is available in the standard location or not
HAVE_LAME_H_STD=no
AC_CHECK_HEADER(lame.h, HAVE_LAME_H_STD=no, :)
AC_CHECK_HEADER(lame/lame.h, HAVE_LAME_H_STD=yes, :)
AC_MSG_CHECKING(for lame.h in right location)
if test "x$HAVE_LAME_H_STD" = "xyes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
HAVE_LIBLAME=no
if test "x$HAVE_LAME_H_STD"="xno"; then
AC_MSG_WARN(lame.h found in include dir,)
AC_MSG_WARN( while it should be in it's own lame/ dir !)
fi
fi
dnl now do the actual "do we have it ?" test
if test "x$HAVE_LIBLAME" = "xyes"; then
LIBLAME_LIBS="-lmp3lame -lm"
dnl execute what we have to because it's found
ifelse([$2], , :, [$2])
else
LIBLAME_LIBS=""
dnl execute what we have to because it's not found
ifelse([$3], , :, [$3])
fi
dnl make variables available
AC_SUBST(LIBLAME_LIBS)
AC_SUBST(HAVE_LIBLAME)
])

View file

@ -1,59 +0,0 @@
dnl slurp-ffmpeg.m4 0.1.1
dnl a macro to slurp in ffmpeg's cvs source inside a project tree
dnl taken from Autostar Sandbox, http://autostars.sourceforge.net/
dnl Usage:
dnl AS_SLURP_FFMPEG(DIRECTORY, DATE, [ACTION-IF-WORKED [, ACTION-IF-NOT-WORKED]]])
dnl
dnl Example:
dnl AM_PATH_FFMPEG(lib/ffmpeg, 2002-12-14 12:00 GMT)
dnl
dnl make sure you have a Tag file in the dir where you check out that
dnl is the Tag of CVS you want to have checked out
dnl it should correspond to the DATE argument you supply, ie resolve to
dnl the same date
dnl (in an ideal world, cvs would understand it's own Tag file format as
dnl a date spec)
AC_DEFUN([AS_SLURP_FFMPEG],
[
# save original dir
FAILED=""
DIRECTORY=`pwd`
# get/update cvs
if test ! -d $1; then mkdir -p $1; fi
dnl we need to check $srcdir/$1 or it will always checkout ffmpeg even if it is there
dnl at least when top_srcdir != top_builddir.
dnl FIXME: unfortunately this makes the checkout go into top_srcdir
cd $srcdir/$1
if test ! -e ffmpeg/README; then
# check out cvs code
AC_MSG_NOTICE(checking out ffmpeg cvs code from $2 into $1)
cvs -Q -z4 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co -D '$2' ffmpeg || FAILED=yes
else
# compare against Tag file and see if it needs updating
if test "`cat Tag`" == "$2"; then
AC_MSG_NOTICE(ffmpeg cvs code in sync)
else
cd ffmpeg
AC_MSG_NOTICE(updating ffmpeg cvs code to $2)
cvs -Q -z4 update -dP -D '$2' || FAILED=yes
cd ..
fi
fi
if test "x$FAILED" != "xyes"; then
echo "$2" > Tag
fi
# now go back
cd $DIRECTORY
if test "x$FAILED" == "xyes"; then
[$4]
false
else
[$3]
true
fi
])

202
m4/esd.m4
View file

@ -1,202 +0,0 @@
# Configure paths for ESD
# Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
dnl
AC_DEFUN([AM_PATH_ESD],
[dnl
dnl Get the cflags and libraries from the esd-config script
dnl
AC_ARG_WITH(esd-prefix,
AC_HELP_STRING([--with-esd-prefix=PFX],
[prefix where ESD is installed (optional)]),
esd_prefix="$withval", esd_prefix="")
AC_ARG_WITH(esd-exec-prefix,
AC_HELP_STRING([--with-esd-exec-prefix=PFX],
[exec prefix where ESD is installed (optional)]),
esd_exec_prefix="$withval", esd_exec_prefix="")
AC_ARG_ENABLE(esdtest,
AC_HELP_STRING([--disable-esdtest],
[do not try to compile and run a test ESD program]),
, enable_esdtest=yes)
if test x$esd_exec_prefix != x ; then
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
fi
fi
if test x$esd_prefix != x ; then
esd_args="$esd_args --prefix=$esd_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_prefix/bin/esd-config
fi
fi
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
min_esd_version=ifelse([$1], ,0.2.7,$1)
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
no_esd=""
if test "$ESD_CONFIG" = "no" ; then
no_esd=yes
else
AC_LANG_SAVE
AC_LANG_C
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
esd_major_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_esdtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
dnl
dnl Now check if the installed ESD is sufficiently new. (Also sanity
dnl checks the results of esd-config to some extent
dnl
rm -f conf.esdtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.esdtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_esd_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_esd_version");
exit(1);
}
if (($esd_major_version > major) ||
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
printf("*** to point to the correct copy of esd-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
if test "x$no_esd" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ESD_CONFIG" = "no" ; then
echo "*** The esd-config script installed by ESD could not be found"
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ESD_CONFIG environment variable to the"
echo "*** full path to esd-config."
else
if test -f conf.esdtest ; then
:
else
echo "*** Could not run ESD test program, checking why..."
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([
#include <stdio.h>
#include <esd.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding ESD or finding the wrong"
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means ESD was incorrectly installed"
echo "*** or that you have moved ESD since it was installed. In the latter case, you"
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
ESD_CFLAGS=""
ESD_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ESD_CFLAGS)
AC_SUBST(ESD_LIBS)
rm -f conf.esdtest
])
dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
dnl
AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
[dnl
AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
ac_save_ESD_CFLAGS="$ESD_CFLAGS"
ac_save_ESD_LIBS="$ESD_LIBS"
AM_PATH_ESD(0.2.21,
ifelse([$1], , [
AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, true)
AC_DEFINE(ESD_SUPPORTS_MULTIPLE_RECORD, 1,
[Define if you have esound with support of multiple recording clients.])],
[$1]),
ifelse([$2], , [AM_CONDITIONAL(ESD_SUPPORTS_MULTIPLE_RECORD, false)], [$2])
if test "x$ac_save_ESD_CFLAGS" != x ; then
ESD_CFLAGS="$ac_save_ESD_CFLAGS"
fi
if test "x$ac_save_ESD_LIBS" != x ; then
ESD_LIBS="$ac_save_ESD_LIBS"
fi
)
])

View file

@ -1,40 +0,0 @@
dnl AM_GCONF_SOURCE_2
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
dnl (i.e. pass to gconftool-2
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
dnl you should install foo.schemas files
dnl
AC_DEFUN([AM_GCONF_SOURCE_2],
[
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
else
GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
fi
AC_ARG_WITH(gconf-source,
[ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
fi
AC_ARG_WITH(gconf-schema-file-dir,
[ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
AC_ARG_ENABLE(schemas-install,
[ --disable-schemas-install Disable the schemas installation],
[case "${enableval}" in
yes) schemas_install=true ;;
no) schemas_install=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
esac],[schemas_install=true])
AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
])

View file

@ -1,196 +0,0 @@
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN([AM_PATH_GLIB],
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])

View file

@ -1,28 +0,0 @@
dnl Perform a check for existence of ARTSC
dnl Richard Boulton <richard-alsa@tartarus.org>
dnl Last modification: 26/06/2001
dnl GST_CHECK_ARTSC()
dnl
dnl This check was written for GStreamer: it should be renamed and checked
dnl for portability if you decide to use it elsewhere.
dnl
AC_DEFUN([GST_CHECK_ARTSC],
[
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
if test "x$ARTSC_CONFIG" = "xno"; then
AC_MSG_WARN([Couldn't find artsc-config])
HAVE_ARTSC=no
ARTSC_LIBS=
ARTSC_CFLAGS=
else
ARTSC_LIBS=`artsc-config --libs`
ARTSC_CFLAGS=`artsc-config --cflags`
dnl AC_CHECK_HEADER uses CPPFLAGS, but not CFLAGS.
dnl FIXME: Ensure only suitable flags result from artsc-config --cflags
CPPFLAGS="$CPPFLAGS $ARTSC_CFLAGS"
AC_CHECK_HEADER(artsc.h, HAVE_ARTSC=yes, HAVE_ARTSC=no)
fi
AC_SUBST(ARTSC_LIBS)
AC_SUBST(ARTSC_CFLAGS)
])

View file

@ -1,262 +0,0 @@
# Configure paths for libebml
dnl PATH_EBML([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libebml, and define EBML_CFLAGS and EBML_LIBS
dnl
AC_DEFUN([PATH_EBML],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ebml-prefix,[ --with-ebml-prefix=PFX Prefix where libebml is installed (optional)], ebml_prefix="$withval", ebml_prefix="")
AC_ARG_WITH(ebml-include,[ --with-ebml-include=DIR Path to where the libebml include files installed (optional)], ebml_include="$withval", ebml_include="")
AC_ARG_WITH(ebml-lib,[ --with-ebml-lib=DIR Path to where the libebml library installed (optional)], ebml_lib="$withval", ebml_lib="")
AC_ARG_ENABLE(ebmltest, [ --disable-ebmltest Do not try to compile and run a test EBML program],, enable_ebmltest=yes)
if test "x$ebml_prefix" != "x"; then
ebml_args="$ebml_args --prefix=$ebml_prefix"
if test "x$ebml_include" != "x"; then
EBML_CFLAGS="-I$ebml_include"
else
EBML_CFLAGS="-I$ebml_prefix/include/ebml"
fi
if test "x$ebml_lib" != "x"; then
EBML_LIBS="-L$ebml_lib"
else
EBML_LIBS="-L$ebml_prefix/lib"
fi
elif test "x$prefix" != "xNONE"; then
ebml_args="$ebml_args --prefix=$prefix"
if test "x$ebml_include" != "x"; then
EBML_CFLAGS="-I$ebml_include"
else
EBML_CFLAGS="-I$prefix/include/ebml"
fi
if test "x$ebml_lib" != "x"; then
EBML_LIBS="-L$ebml_lib"
else
EBML_LIBS="-L$prefix/lib"
fi
else
if test "x$ebml_include" != "x"; then
EBML_CFLAGS="-I$ebml_include"
else
EBML_CFLAGS="-I/usr/include/ebml -I/usr/local/include/ebml"
fi
if test "x$ebml_lib" != "x"; then
EBML_LIBS="-L$ebml_lib"
else
EBML_LIBS="-L/usr/local/lib"
fi
fi
EBML_LIBS="$EBML_LIBS -lebml"
AC_MSG_CHECKING(for EBML)
no_ebml=""
if test "x$enable_ebmltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $EBML_CFLAGS"
LIBS="$LIBS $EBML_LIBS"
dnl
dnl Now check if the installed EBML is sufficiently new.
dnl
rm -f conf.ebmltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <EbmlConfig.h>
int main ()
{
system("touch conf.ebmltest");
return 0;
}
],, no_ebml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_ebml" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.ebmltest ; then
:
else
echo "*** Could not run Ebml test program, checking why..."
CFLAGS="$CFLAGS $EBML_CFLAGS"
LIBS="$LIBS $EBML_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <EbmlConfig.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding EBML or finding the wrong"
echo "*** version of EBML. If it is not finding EBML, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means EBML was incorrectly installed"
echo "*** or that you have moved EBML since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
EBML_CFLAGS=""
EBML_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(EBML_CFLAGS)
AC_SUBST(EBML_LIBS)
rm -f conf.ebmltest
])
# Configure paths for libmatroska
dnl PATH_MATROSKA(MIN_VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libmatroska, and define MATROSKA_CFLAGS and MATROSKA_LIBS
dnl
AC_DEFUN([PATH_MATROSKA],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(matroska-prefix,[ --with-matroska-prefix=PFX Prefix where libmatroska is installed (optional)], matroska_prefix="$withval", matroska_prefix="")
AC_ARG_WITH(matroska-include,[ --with-matroska-include=DIR Path to where the libmatroska include files installed (optional)], matroska_include="$withval", matroska_include="")
AC_ARG_WITH(matroska-lib,[ --with-matroska-lib=DIR Path to where the libmatroska library installed (optional)], matroska_lib="$withval", matroska_lib="")
AC_ARG_ENABLE(matroskatest, [ --disable-matroskatest Do not try to compile and run a test Matroska program],, enable_matroskatest=yes)
if test "x$matroska_prefix" != "x"; then
matroska_args="$matroska_args --prefix=$matroska_prefix"
if test "x$matroska_include" != "x"; then
MATROSKA_CFLAGS="-I$matroska_include"
else
MATROSKA_CFLAGS="-I$matroska_prefix/include/matroska"
fi
if test "x$matroska_lib" != "x"; then
MATROSKA_LIBS="-L$matroska_lib"
else
MATROSKA_LIBS="-L$matroska_prefix/lib"
fi
elif test "x$prefix" != "xNONE"; then
matroska_args="$matroska_args --prefix=$prefix"
if test "x$matroska_include" != "x"; then
MATROSKA_CFLAGS="-I$matroska_include"
else
MATROSKA_CFLAGS="-I$prefix/include/matroska"
fi
if test "x$matroska_lib" != "x"; then
MATROSKA_LIBS="-L$matroska_lib"
else
MATROSKA_LIBS="-L$prefix/lib"
fi
else
if test "x$matroska_include" != "x"; then
MATROSKA_CFLAGS="-I$matroska_include"
else
MATROSKA_CFLAGS="-I/usr/include/matroska -I/usr/local/include/matroska"
fi
if test "x$matroska_lib" != "x"; then
MATROSKA_LIBS="-L$matroska_lib"
else
MATROSKA_LIBS="-L/usr/local/lib"
fi
fi
MATROSKA_LIBS="$MATROSKA_LIBS -lmatroska"
AC_MSG_CHECKING(for Matroska)
no_matroska=""
if test "x$enable_matroskatest" = "xyes" ; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $MATROSKA_CFLAGS $EBML_CFLAGS"
LIBS="$LIBS $MATROSKA_LIBS $EBML_LIBS"
dnl
dnl Now check if the installed Matroska is sufficiently new.
dnl
rm -f conf.matroskatest
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <EbmlConfig.h>
#include <KaxVersion.h>
using namespace LIBMATROSKA_NAMESPACE;
int main ()
{
FILE *f;
f = fopen("conf.matroskatest", "wb");
if (f == NULL)
return 1;
fprintf(f, "%s\n", KaxCodeVersion.c_str());
fclose(f);
return 0;
}
],, no_matroska=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
AC_LANG_C
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_matroska" = "x" -a -f conf.matroskatest ; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(Matroska version)
matroska_version=`cat conf.matroskatest`
mk_MAJVER=`echo $1 | cut -d"." -f1`
mk_MINVER=`echo $1 | cut -d"." -f2`
mk_RELVER=`echo $1 | cut -d"." -f3`
mver_ok=`sed 's;\.;\ ;g' < conf.matroskatest | (read -a mver
if test ${mver[[0]]} -gt $mk_MAJVER ; then
mver_ok=1
elif test ${mver[[0]]} -lt $mk_MAJVER ; then
mver_ok=0
else
if test ${mver[[1]]} -gt $mk_MINVER ; then
mver_ok=1
elif test ${mver[[1]]} -lt $mk_MINVER ; then
mver_ok=0
else
if test ${mver[[2]]} -ge $mk_RELVER ; then
mver_ok=1
else
mver_ok=0
fi
fi
fi
echo $mver_ok )`
if test "$mver_ok" = "1" ; then
AC_MSG_RESULT($matroska_version ok)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT($matroska_version too old)
echo '*** Your Matroska version is too old. Upgrade to at least version'
echo '*** $1 and re-run configure.'
ifelse([$3], , :, [$3])
fi
else
AC_MSG_RESULT(no)
ifelse([$3], , :, [$3])
fi
AC_SUBST(MATROSKA_CFLAGS)
AC_SUBST(MATROSKA_LIBS)
rm -f conf.matroskatest
])

View file

@ -1,184 +0,0 @@
# stuff for SDL, hope this helps if we put it here
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,
AC_HELP_STRING([--with-sdl-prefix=PFX],
[prefix where SDL is installed (optional)]),
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,
AC_HELP_STRING([--with-sdl-exec-prefix=PFX],
[exec prefix where SDL is installed (optional)]),
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest,
AC_HELP_STRING([--disable-sdltest],
[do not try to compile and run a test SDL program]),
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])

View file

@ -1,102 +0,0 @@
# Configure paths for libshout
# Jack Moffitt <jack@icecast.org> 08-06-2001
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl AM_PATH_SHOUT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libshout 2, and define SHOUT2_CFLAGS and SHOUT2_LIBS
dnl
AC_DEFUN([AM_PATH_SHOUT2],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(shout2-prefix,[ --with-shout2-prefix=PFX Prefix where libshout2 is installed (optional)], shout2_prefix="$withval", shout2_prefix="")
AC_ARG_ENABLE(shout2test, [ --disable-shout2test Do not try to compile and run a test shout2 program],, enable_shout2test=yes)
if test "x$shout2_prefix" != "xNONE" ; then
SHOUT2_CFLAGS="-I$shout2_prefix/include"
SHOUT2_LIBS="-L$shout2_prefix/lib"
elif test "x$prefix" != "x"; then
SHOUT2_CFLAGS="-I$prefix/include"
SHOUT2_LIBS="-L$prefix/lib"
fi
SHOUT2_LIBS="$SHOUT2_LIBS -lshout -lpthread"
case $host in
*-*-solaris*)
SHOUT2_LIBS="$SHOUT2_LIBS -lnsl -lsocket -lresolv"
esac
AC_MSG_CHECKING(for shout2)
no_shout2=""
if test "x$enable_shout2test" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SHOUT2_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $SHOUT2_LIBS $OGG_LIBS $VORBIS_LIBS"
dnl
dnl Now check if the installed shout2 is sufficiently new.
dnl
rm -f conf.shout2test
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <shout/shout.h>
int main ()
{
int major, minor, patch;
system("touch conf.shout2test");
shout_version(&major, &minor, &patch);
if (major < 2)
return 1;
return 0;
}
],, no_shout2=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_shout2" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.shout2test ; then
:
else
echo "*** Could not run Shout2 test program, checking why..."
CFLAGS="$CFLAGS $SHOUT2_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $SHOUT2_LIBS $OGG_LIBS $VORBIS_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <shout/shout.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Shout2 or finding the wrong"
echo "*** version of Shout2. If it is not finding Shout2, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Shout2 was incorrectly installed"
echo "*** or that you have moved Shout2 since it was installed. In the latter case, you"
echo "*** may want to edit the shout-config script: $SHOUT2_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
SHOUT2_CFLAGS=""
SHOUT2_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(SHOUT2_CFLAGS)
AC_SUBST(SHOUT2_LIBS)
rm -f conf.shout2test
])

View file

@ -1,39 +0,0 @@
dnl check for sidplay
AC_DEFUN([GST_PATH_SIDPLAY],
[
AC_MSG_CHECKING([for libsidplay 1.36.x])
AC_LANG_PUSH(C++)
AC_CHECK_HEADER(sidplay/player.h, HAVE_SIDPLAY="yes", HAVE_SIDPLAY="no")
if test $HAVE_SIDPLAY = "yes"; then
SIDPLAY_LIBS="-lsidplay"
AC_MSG_CHECKING([whether -lsidplay works])
ac_libs_safe=$LIBS
LIBS="-lsidplay"
AC_TRY_RUN([
#include <sidplay/player.h>
int main()
{ sidTune tune = sidTune(0); }
],
HAVE_SIDPLAY="yes",
HAVE_SIDPLAY="no",
HAVE_SIDPLAY="no")
LIBS="$ac_libs_safe"
AC_MSG_RESULT([$HAVE_SIDPLAY])
fi
SIDPLAY_CFLAGS=
SIDPLAY_LIBS="-lsidplay"
AC_SUBST(SIDPLAY_CFLAGS)
AC_SUBST(SIDPLAY_LIBS)
AC_LANG_POP(C++)
])

194
m4/gtk.m4
View file

@ -1,194 +0,0 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN([AM_PATH_GTK],
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
for module in . $4
do
case "$module" in
gthread)
gtk_config_args="$gtk_config_args gthread"
;;
esac
done
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found"
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

View file

@ -1,182 +0,0 @@
dnl AM_PATH_LIBFAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for libfame, and define LIBFAME_CFLAGS and LIBFAME_LIBS
dnl Vivien Chappelier 12/11/00
dnl stolen from ORBit autoconf
dnl
AC_DEFUN([AM_PATH_LIBFAME],
[dnl
dnl Get the cflags and libraries from the libfame-config script
dnl
AC_ARG_WITH(libfame-prefix,[ --with-libfame-prefix=PFX Prefix where libfame is installed (optional)],
libfame_config_prefix="$withval", libfame_config_prefix="")
AC_ARG_WITH(libfame-exec-prefix,[ --with-libfame-exec-prefix=PFX Exec prefix where libfame is installed (optional)],
libfame_config_exec_prefix="$withval", libfame_config_exec_prefix="")
AC_ARG_ENABLE(libfametest, [ --disable-libfametest Do not try to compile and run a test libfame program],
, enable_libfametest=yes)
if test x$libfame_config_exec_prefix != x ; then
libfame_config_args="$libfame_config_args --exec-prefix=$libfame_config_exec_prefix"
if test x${LIBFAME_CONFIG+set} != xset ; then
LIBFAME_CONFIG=$libfame_config_exec_prefix/bin/libfame-config
fi
fi
if test x$libfame_config_prefix != x ; then
libfame_config_args="$libfame_config_args --prefix=$libfame_config_prefix"
if test x${LIBFAME_CONFIG+set} != xset ; then
LIBFAME_CONFIG=$libfame_config_prefix/bin/libfame-config
fi
fi
AC_PATH_PROG(LIBFAME_CONFIG, libfame-config, no)
min_libfame_version=ifelse([$1], , 0.9.0, $1)
AC_MSG_CHECKING(for libfame - version >= $min_libfame_version)
no_libfame=""
if test "$LIBFAME_CONFIG" = "no" ; then
no_libfame=yes
else
LIBFAME_CFLAGS=`$LIBFAME_CONFIG $libfame_config_args --cflags`
LIBFAME_LIBS=`$LIBFAME_CONFIG $libfame_config_args --libs`
libfame_config_major_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libfame_config_minor_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libfame_config_micro_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_libfametest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
LIBS="$LIBFAME_LIBS $LIBS"
dnl
dnl Now check if the installed LIBFAME is sufficiently new. (Also sanity
dnl checks the results of libfame-config to some extent
dnl
rm -f conf.libfametest
AC_TRY_RUN([
#include <fame.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.libfametest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = strdup("$min_libfame_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libfame_version");
exit(1);
}
if ((libfame_major_version != $libfame_config_major_version) ||
(libfame_minor_version != $libfame_config_minor_version) ||
(libfame_micro_version != $libfame_config_micro_version))
{
printf("\n*** 'libfame-config --version' returned %d.%d.%d, but Libfame (%d.%d.%d)\n",
$libfame_config_major_version, $libfame_config_minor_version, $libfame_config_micro_version,
libfame_major_version, libfame_minor_version, libfame_micro_version);
printf ("*** was found! If libfame-config was correct, then it is best\n");
printf ("*** to remove the old version of libfame. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If libfame-config was wrong, set the environment variable LIBFAME_CONFIG\n");
printf("*** to point to the correct copy of libfame-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (LIBFAME_MAJOR_VERSION) && defined (LIBFAME_MINOR_VERSION) && defined (LIBFAME_MICRO_VERSION)
else if ((libfame_major_version != LIBFAME_MAJOR_VERSION) ||
(libfame_minor_version != LIBFAME_MINOR_VERSION) ||
(libfame_micro_version != LIBFAME_MICRO_VERSION))
{
printf("*** libfame header files (version %d.%d.%d) do not match\n",
LIBFAME_MAJOR_VERSION, LIBFAME_MINOR_VERSION, LIBFAME_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
libfame_major_version, libfame_minor_version, libfame_micro_version);
}
#endif /* defined (LIBFAME_MAJOR_VERSION) ... */
else
{
if ((libfame_major_version > major) ||
((libfame_major_version == major) && (libfame_minor_version > minor)) ||
((libfame_major_version == major) && (libfame_minor_version == minor) && (libfame_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libfame (%d.%d.%d) was found.\n",
libfame_major_version, libfame_minor_version, libfame_micro_version);
printf("*** You need a version of libfame newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** libfame is always available from http://www-eleves.enst-bretagne.fr/~chappeli/fame\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libfame-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libfame, but you can also set the LIBFAME_CONFIG environment to point to the\n");
printf("*** correct copy of libfame-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_libfame=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_libfame" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBFAME_CONFIG" = "no" ; then
echo "*** The libfame-config script installed by libfame could not be found"
echo "*** If libfame was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBFAME_CONFIG environment variable to the"
echo "*** full path to libfame-config."
else
if test -f conf.libfametest ; then
:
else
echo "*** Could not run libfame test program, checking why..."
CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
LIBS="$LIBS $LIBFAME_LIBS"
AC_TRY_LINK([
#include <fame.h>
#include <stdio.h>
], [ return ((libfame_major_version) || (libfame_minor_version) || (libfame_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libfame or finding the wrong"
echo "*** version of LIBFAME. If it is not finding libfame, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libfame was incorrectly installed"
echo "*** or that you have moved libfame since it was installed. In the latter case, you"
echo "*** may want to edit the libfame-config script: $LIBFAME_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
LIBFAME_CFLAGS=""
LIBFAME_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBFAME_CFLAGS)
AC_SUBST(LIBFAME_LIBS)
rm -f conf.libfametest
])

View file

@ -1,216 +0,0 @@
# Configure paths for libmikmod
#
# Derived from glib.m4 (Owen Taylor 97-11-3)
# Improved by Chris Butler
#
dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and
dnl LIBMIKMOD_LDADD
dnl
AC_DEFUN([AM_PATH_LIBMIKMOD],
[dnl
dnl Get the cflags and libraries from the libmikmod-config script
dnl
AC_ARG_WITH(libmikmod-prefix,
AC_HELP_STRING([--with-libmikmod-prefix=PFX],
[prefix where libmikmod is installed (optional)]),
libmikmod_config_prefix="$withval", libmikmod_config_prefix="")
AC_ARG_WITH(libmikmod-exec-prefix,
AC_HELP_STRING([--with-libmikmod-exec-prefix=PFX],
[exec prefix where libmikmod is installed (optional)]),
libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="")
AC_ARG_ENABLE(libmikmodtest,
AC_HELP_STRING([--disable-libmikmodtest],
[Do not try to compile and run a test libmikmod program]),
, enable_libmikmodtest=yes)
if test x$libmikmod_config_exec_prefix != x ; then
libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix"
if test x${LIBMIKMOD_CONFIG+set} != xset ; then
LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config
fi
fi
if test x$libmikmod_config_prefix != x ; then
libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix"
if test x${LIBMIKMOD_CONFIG+set} != xset ; then
LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config
fi
fi
AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no)
min_libmikmod_version=ifelse([$1], ,3.1.5,$1)
AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version)
no_libmikmod=""
if test "$LIBMIKMOD_CONFIG" = "no" ; then
no_libmikmod=yes
else
LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags`
LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs`
LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd`
libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
if test "x$enable_libmikmodtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
AC_LANG_SAVE
AC_LANG_C
CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS $LIBMIKMOD_LDADD"
LIBS="$LIBMIKMOD_LIBS $LIBS"
dnl
dnl Now check if the installed libmikmod is sufficiently new. (Also sanity
dnl checks the results of libmikmod-config to some extent
dnl
rm -f conf.mikmodtest
AC_TRY_RUN([
#include <mikmod.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* my_strdup (char *str)
{
char *new_str;
if (str) {
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
} else
new_str = NULL;
return new_str;
}
int main()
{
int major,minor,micro;
int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version;
char *tmp_version;
system("touch conf.mikmodtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_libmikmod_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libmikmod_version");
exit(1);
}
libmikmod_major_version=(MikMod_GetVersion() >> 16) & 255;
libmikmod_minor_version=(MikMod_GetVersion() >> 8) & 255;
libmikmod_micro_version=(MikMod_GetVersion() ) & 255;
if ((libmikmod_major_version != $libmikmod_config_major_version) ||
(libmikmod_minor_version != $libmikmod_config_minor_version) ||
(libmikmod_micro_version != $libmikmod_config_micro_version))
{
printf("\n*** 'libmikmod-config --version' returned %d.%d.%d, but libmikmod (%d.%d.%d)\n",
$libmikmod_config_major_version, $libmikmod_config_minor_version, $libmikmod_config_micro_version,
libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
printf ("*** was found! If libmikmod-config was correct, then it is best\n");
printf ("*** to remove the old version of libmikmod. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If libmikmod-config was wrong, set the environment variable LIBMIKMOD_CONFIG\n");
printf("*** to point to the correct copy of libmikmod-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((libmikmod_major_version != LIBMIKMOD_VERSION_MAJOR) ||
(libmikmod_minor_version != LIBMIKMOD_VERSION_MINOR) ||
(libmikmod_micro_version != LIBMIKMOD_REVISION))
{
printf("*** libmikmod header files (version %ld.%ld.%ld) do not match\n",
LIBMIKMOD_VERSION_MAJOR, LIBMIKMOD_VERSION_MINOR, LIBMIKMOD_REVISION);
printf("*** library (version %d.%d.%d)\n",
libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
}
else
{
if ((libmikmod_major_version > major) ||
((libmikmod_major_version == major) && (libmikmod_minor_version > minor)) ||
((libmikmod_major_version == major) && (libmikmod_minor_version == minor) && (libmikmod_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libmikmod (%d.%d.%d) was found.\n",
libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
printf("*** You need a version of libmikmod newer than %d.%d.%d.\n",
major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libmikmod-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libmikmod, but you can also set the LIBMIKMOD_CONFIG environment to point to the\n");
printf("*** correct copy of libmikmod-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_libmikmod=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
if test "x$no_libmikmod" = x ; then
AC_MSG_RESULT([yes, `$LIBMIKMOD_CONFIG --version`])
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBMIKMOD_CONFIG" = "no" ; then
echo "*** The libmikmod-config script installed by libmikmod could not be found"
echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the"
echo "*** full path to libmikmod-config."
else
if test -f conf.mikmodtest ; then
:
else
echo "*** Could not run libmikmod test program, checking why..."
CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
LIBS="$LIBS $LIBMIKMOD_LIBS"
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([
#include <mikmod.h>
#include <stdio.h>
], [ return (MikMod_GetVersion()!=0); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libmikmod or finding the wrong"
echo "*** version of libmikmod. If it is not finding libmikmod, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location. Also, make sure you have run ldconfig if that"
echo "*** is required on your system."
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libmikmod was incorrectly installed"
echo "*** or that you have moved libmikmod since it was installed. In the latter case, you"
echo "*** may want to edit the libmikmod-config script: $LIBMIKMOD_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
LIBMIKMOD_CFLAGS=""
LIBMIKMOD_LIBS=""
LIBMIKMOD_LDADD=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBMIKMOD_CFLAGS)
AC_SUBST(LIBMIKMOD_LIBS)
AC_SUBST(LIBMIKMOD_LDADD)
rm -f conf.mikmodtest
])