AC_INIT(src/vmg.c) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(libdvdplay, 1.0.1) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_STDC_HEADERS AM_PROG_LIBTOOL AC_C_BIGENDIAN AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_CHECK_FUNCS(vasprintf) AC_CHECK_HEADERS(unistd.h inttypes.h stdint.h) dnl dnl Check the operating system dnl case x"${target_os}" in xdarwin*) CFLAGS="${CFLAGS} -no-cpp-precomp" ;; xbeos*) AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.) ;; x*) ;; esac dnl dnl libdvdread static linking dnl AC_ARG_WITH(dvdread-tree, [ --with-dvdread-tree=PATH libdvdread tree for static linking]) if test "x${with_dvdread_tree}" != x then AC_MSG_CHECKING(for ifo_types.h in ${with_dvdread_tree}) real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`" if test "x${real_dvdread_tree}" = "x" then dnl The given directory can't be found AC_MSG_RESULT(no) AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}]) fi if test -f "${real_dvdread_tree}/dvdread/ifo_types.h" then dnl Use a custom libdvdread AC_MSG_RESULT(${real_dvdread_tree}/dvdread/ifo_types.h) CPPFLAGS="${CPPFLAGS} -I${real_dvdread_tree}" else AC_MSG_RESULT(no) AC_MSG_ERROR([cannot find dvdread/ifo_types.h in ${with_dvdread_tree}]) fi fi CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDPLAY_DIST $CFLAGS" dnl Trace vmg commands AC_ARG_ENABLE(trace, [ --enable-trace print vmg commands (default disabled)], [ if test "x$enable-trace" != "xno" then CFLAGS="-DTRACE $CFLAGS" fi]) AC_OUTPUT([Makefile src/Makefile src/dvdplay/Makefile debian/Makefile])