# Filename: configure.in AC_INIT(src/miav.cc) AM_INIT_AUTOMAKE( miav, 0.3.2 ) AC_PROG_CXX AC_PROG_LIBTOOL AM_PROG_LIBTOOL AM_CONFIG_HEADER(config.h) AC_STDC_HEADERS CXXFLAGS="$CXXFLAGS -Wall -Werror" AC_ARG_WITH(gui, [ --without-gui build without GUI support]) if test x$with_gui != xno && test -z "$GUI"; then dnl ===================== dnl Check for QT library dnl ===================== gw_CHECK_QT CXXFLAGS="$CXXFLAGS $QT_CXXLAGS" LDFLAGS="$LDFLAGS $QT_LDADD" dnl ===================== dnl Check for SDL library dnl ===================== SDL_VERSION=1.2.0 AM_PATH_SDL($SDL_VERSION,:,AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LDFLAGS="$LDFLAGS $SDL_LIBS" dnl ====================== dnl Check for raw1394 library dnl ====================== AC_CHECK_HEADER(libraw1394/raw1394.h, , AC_MSG_ERROR([*** libraw1394 headers not found!])) AC_CHECK_LIB(raw1394, raw1394_get_userdata, , AC_MSG_ERROR([*** libraw1394 not found!])) dnl Make code aware of the gui AC_DEFINE([USE_GUI], [], [Is defined if the project is configured to compile with gui]) else AC_MSG_WARN([*** Building without GUI support!]) fi dnl ====================== dnl Check for pthread library dnl ====================== AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR([*** pthread headers not found!])) AC_CHECK_LIB(pthread, sem_init, , AC_MSG_ERROR([*** libpthread not found!])) dnl ====================== dnl Check for dv library dnl ====================== AC_CHECK_HEADER(libdv/dv.h, , AC_MSG_ERROR([*** libdv headers not found!])) AC_CHECK_LIB(dv, dv_decode_full_frame, , AC_MSG_ERROR([*** libdv not found!])) dnl ====================== dnl Check for Jpeg library dnl ====================== AC_CHECK_HEADER(jpeglib.h, , AC_MSG_ERROR([*** libJpeg not found!])) AC_CHECK_LIB(jpeg, jpeg_start_compress, , AC_MSG_ERROR([*** libJpeg not found!])) dnl ====================== dnl Check for Fame library dnl ====================== AC_CHECK_HEADER(fame.h, , AC_MSG_ERROR([*** libFAME include files not found!])) AC_CHECK_LIB(fame, fame_init, , AC_MSG_ERROR([*** libFAME not found!])) dnl ====================== dnl Check for Lame library dnl ====================== AC_CHECK_HEADER(lame/lame.h, , AC_MSG_ERROR([*** libLAME (libmp3lame) include files not found!])) AC_CHECK_LIB(mp3lame, lame_init, , AC_MSG_ERROR([*** libLAME (libmp3lame) not found!])) dnl ====================== dnl Check for mplex library dnl ====================== PKG_CHECK_MODULES(MPLEX, mjpegtools >= 1.6.1.93, [ dnl switch over to c++ to test things AC_LANG_CPLUSPLUS OLD_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MPLEX_CFLAGS" AC_CHECK_HEADER(interact.hpp, [ MPLEX_LIBS="$MPLEX_LIBS -lmplex2 -lm" OLD_LIBS="$LIBS" LIBS="$LIBS $MPLEX_LIBS" AC_MSG_CHECKING([for valid mplex objects]) AC_TRY_RUN([ #include #include #include int main (int argc, char *argv[]) { class TestOutputStream : public OutputStream { public: TestOutputStream () : OutputStream () { } void Write (uint8_t *a, unsigned int b) { } void NextSegment () { } off_t SegmentSize () { } void Close () { } int Open () { } }; MultiplexJob *job = new MultiplexJob (); vector inputs; job->SetupInputStreams (inputs); TestOutputStream *out = new TestOutputStream (); Multiplexor *mux = new Multiplexor(*job, *out); return 0; } ],[ HAVE_MPLEX="yes" AC_SUBST(MPLEX_CFLAGS) AC_SUBST(MPLEX_LIBS) AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) #LIBS="$OLD_LIBS" ]) #CPPFLAGS="$OLD_CPPFLAGS" AC_LANG_C ], HAVE_MPLEX="no") AC_CHECK_LIB(mplex2, main, , AC_MSG_ERROR([*** libmplex2 not found (part of the mjpegtools package)!])) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(LDFLAGS) AC_OUTPUT( Makefile src/Makefile tools/Makefile etc/Makefile pixmaps/Makefile man/Makefile)