dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(NIST, 0.6) AM_CONFIG_HEADER(config.h) dnl do the macros AM_ACLOCAL_INCLUDE(macros) dnl check host AC_CANONICAL_HOST CFLAGS="$CFLAGS -Wall -O3" CXXFLAGS="$CXXFLAGS -Wall -O6" dnl Checks for programs. AC_PROG_AWK AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB dnl the video makefile wants nasm dnl should probably just use more portable assembly dnl FIXME: this should only be called if we're using asm! AC_CHECK_PROG(have_nasm, nasm, yes, no) if test "x$have_nasm" = "xno"; then echo " you will need nasm to build the mmx code on x86 platforms" echo " others may safely ignore this." fi AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging [default=no]],echo $enable_debug, enable_debug="no") AC_ARG_ENABLE(profile, [ --enable-profile=[no/yes] turn on profiling [default=no]], echo $enable_profile, enable_profile="no") AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], echo $enable_shm, enable_shm="yes") AC_ARG_ENABLE(Xdga, [ --enable-Xdga=[no/yes] turn on debugging [default=no]],echo $enable_Xdga, enable_Xdga="no") dnl Checks found in macros GNOME_PTHREAD_CHECK dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME dnl Checks for library functions. AC_FUNC_ALLOCA AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_CHECK_FUNCS(gettimeofday re_comp regcomp select socket strdup strerror) # Find the X11 include and library directories AC_PATH_X AC_PATH_XTRA if test "x$x_includes" = "x"; then x_includes="/usr/include" fi CFLAGS="$CFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS" if test "x$no_x" = "xyes"; then AC_MSG_ERROR([ *** X libraries or include files not found. Check 'config.log' for *** more details.]) fi # Check for the X11 library AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]), $X_EXTRA_LIBS) if test "x$enable_shm" = "xyes"; then # Check for the Xext library (needed for XShm extention) AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs" x_cflags="$x_cflags -DSH_MEM", # On AIX, it is in XextSam instead, but we still need -lXext AC_CHECK_LIB(XextSam, XShmAttach, x_libs="-lXextSam -lXext $x_libs", no_xext_lib=yes, $x_libs), $x_libs) fi #dnl checks for using dga #if test "$enable_Xdga" = yes; then # echo "DGA graphic is not currently supported"; exit 1; # cp ./src/Video/display.cc.openptc ./src/Video/display.cc # AC_PATH_PROG(ptcpath, ptc-config) # AC_MSG_CHECKING(for OpenPTC) # PTC_CFLAGS=`$ptcpath --cflags 2>/dev/null` # PTC_LIBS=`$ptcpath --libs` # if test "_$PTC_CFLAGS" = "_" ; then # AC_MSG_RESULT([not found, building without PTC.]) # else # AC_MSG_RESULT(ok) # PTC_CFLAGS="$PTC_CFLAGS -DUSE_DGA" AC_SUBST(PTC_CFLAGS) AC_SUBST(PTC_LIBS) # fi #else # cp ./src/Video/display.cc.x11 ./src/Video/display.cc #fi dnl if test "x$enable_debug" = "xyes"; then CFLAGS="$CFLAGS -g" CXXFLAGS="$CXXFLAGS -g" fi if test "$enable_profile" = "yes"; then CFLAGS="$CFLAGS -p" CXXFLAGS="$CXXFLAGS -p" fi dnl may need to change these next checks AC_MSG_CHECKING([for MMX]) if test "x$GCC" = "xyes"; then case "$host" in i*86-pc-linux*) AC_MSG_RESULT(yes) CFLAGS="$CFLAGS -DHAVE_MMX -DLINUX -march=i686 -fschedule-insns2 -malign-double" CXXFLAGS="$CXXFLAGS -DHAVE_MMX -DLINUX -march=i686 -fschedule-insns2 -malign-double" mmx_sources="yuv12-rgb16.s reconmmx.s mmxidct.S" mmx_objects="yuv12-rgb16.o reconmmx.o mmxidct.o" test ! -d lib && mkdir lib test ! -d lib/linux && mkdir lib/linux;; powerpc-*-linux-gnu*) AC_MSG_RESULT(no) CFLAGS="$CFLAGS -DLINUX" CXXFLAGS="$CXXFLAGS -DLINUX";; *) echo "$host is not currently supported"; exit 1;; esac fi AC_SUBST(x_cflags) AC_SUBST(x_includes) AC_SUBST(x_ldflags) AC_SUBST(x_libs) AC_SUBST(mmx_sources) AC_SUBST(mmx_objects) dnl Run configure in AC3 AC_CONFIG_SUBDIRS(src/ac3) AC_OUTPUT([ macros/Makefile src/util/Makefile src/buffer/Makefile src/video/Makefile src/audio/Makefile src/demux/Makefile src/Makefile Makefile ])