dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) AC_INIT(GOPchop, 1.0.0, gopchop-bugs@outflux.net, GOPchop) AC_CONFIG_SRCDIR(src/Main.cpp) AC_CONFIG_AUX_DIR(autotools) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(include/config.h) AC_PROG_INTLTOOL AC_CANONICAL_HOST AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_PROG_CXX test -z "$CXX" && AC_MSG_ERROR([Couldn't find a C++ compiler! Please install or define with "CXX=..."]) AC_HEADER_STDC AC_SYS_LARGEFILE AC_TYPE_OFF_T AC_FUNC_FSEEKO AC_PROG_LIBTOOL AM_GNU_GETTEXT AC_DEFUN([adl_FUNC_GETOPT_LONG], [# clean out junk possibly left behind by a previous configuration rm -f lib/getopt.h # Check for getopt_long support AC_CHECK_HEADERS([getopt.h]) AC_CHECK_FUNCS([getopt_long],, [# FreeBSD has a gnugetopt library for this AC_CHECK_LIB([gnugetopt],[getopt_long],[AC_DEFINE([HAVE_GETOPT_LONG])], [# use the GNU replacement AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1) AC_CONFIG_LINKS([lib/getopt.h:lib/gnugetopt.h])])])]) dnl Stupid missing functions dnl AC_CONFIG_LIBOBJ_DIR(lib) adl_FUNC_GETOPT_LONG dnl deal with internal includes INCLUDES='-I$(top_srcdir)/include' AC_SUBST([INCLUDES]) AM_PATH_GTK(1.2.0, , AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) dnl Build in libvo stuff builtin([include],[libvo/configure.incl]) dnl make sure mpeg2dec is available AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR([Couldn't find mpeg2dec/mpeg2.h!]),,) AC_CHECK_LIB([mpeg2],[mpeg2_init],, AC_MSG_ERROR([Couldn't find mpeg2 library!]),,) AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR([Couldn't find mpeg2dec/mpeg2convert.h!]), AC_INCLUDES_DEFAULT() [#include ]) AC_CHECK_LIB([mpeg2convert],[mpeg2convert_rgb],, AC_MSG_ERROR([Couldn't find mpeg2convert library!]),, [$LIBVO_LIBS]) dnl Figure out where the datadir actually is if test "x${datadir}" = 'x${prefix}/share'; then if test "x${prefix}" = "xNONE"; then runtime_datadir="${ac_default_prefix}/share" else runtime_datadir="${prefix}/share" fi else runtime_datadir="${datadir}" fi dnl Set PACKAGE_LOCALE_DIR in config.h. AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], "${runtime_datadir}/locale", [Location of the locale directory]) dnl Set PACKAGE_DATA_DIR in config.h. AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], "${runtime_datadir}/pixmaps/${PACKAGE}",[Location to find pixmaps when installed]) dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED([PACKAGE_SOURCE_DIR], "${packagesrcdir}",[Location to find pixmaps when under development]) dnl get architecture info (care-of mpeg2dec's configure.in) if test x"$GCC" = x"yes"; then dnl arch-specific flags case "$host" in i?86-* | k?-* | x86_64-*) AC_DEFINE([ARCH_X86],,[x86 architecture]) case "$host" in i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; esac AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; ppc-* | powerpc-*) AC_CHECK_HEADER([altivec.h], [TRY_CFLAGS="$ARCH_OPT_CFLAGS -maltivec"], [TRY_CFLAGS="$ARCH_OPT_CFLAGS -faltivec"]) AC_TRY_CFLAGS([$OPT_CFLAGS $TRY_CFLAGS $CFLAGS], [ARCH_OPT_CFLAGS="$TRY_CFLAGS" AC_DEFINE([ARCH_PPC],,[ppc architecture])]);; sparc-* | sparc64-*) AC_DEFINE([ARCH_SPARC],,[sparc architecture]) TRY_CFLAGS="$OPT_CFLAGS -mcpu=ultrasparc -mvis" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; alpha*) AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; esac fi dnl Use -Wall if we have gcc. if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ -Wall\ *) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi AC_CONFIG_FILES([ Makefile autotools/Makefile libvo/Makefile intl/Makefile include/Makefile docs/Makefile src/Makefile po/Makefile.in ]) AC_OUTPUT