2006-01-28 12:29:22 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.50)
|
|
|
|
AC_INIT(src/main.cpp)
|
|
|
|
|
2009-07-25 22:54:57 +02:00
|
|
|
AM_INIT_AUTOMAKE(llcon,3.0.0cvs)
|
2006-01-28 12:29:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
dnl Configuration Arguments
|
|
|
|
|
|
|
|
AC_ARG_ENABLE( sound,[ --enable-sound generic sound support], enable_sound=$enableval, enable_sound=yes)
|
2009-03-10 21:01:46 +01:00
|
|
|
AC_ARG_ENABLE( alsa,[ --enable-alsa use ALSA interface], enable_alsa=$enableval, enable_alsa=no)
|
2009-03-07 23:56:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
if test "$enable_alsa" = "yes"; then
|
|
|
|
dnl checks for ALSA audio
|
|
|
|
AC_CHECK_HEADER(sys/asoundlib.h, , enable_sound=no)
|
|
|
|
AC_CHECK_LIB(asound, snd_pcm_open, , enable_sound=no)
|
|
|
|
else
|
|
|
|
dnl checks for JACK audio
|
2009-03-29 18:50:29 +02:00
|
|
|
AC_CHECK_HEADER([jack/jack.h], have_jack=yes, have_jack=no, [
|
|
|
|
])
|
|
|
|
dnl AM_CONDITIONAL(USE_JACK,test "$have_jack" = yes)
|
|
|
|
|
|
|
|
if test "$have_jack" = yes; then
|
|
|
|
JACK_LIB="-ljack"
|
|
|
|
AC_DEFINE(USE_JACK, 1,[Define to enable JACK input module])
|
2009-03-07 23:56:46 +01:00
|
|
|
fi
|
|
|
|
fi
|
2006-01-28 12:29:22 +01:00
|
|
|
|
|
|
|
if test "$enable_sound" = "yes"; then
|
|
|
|
AC_DEFINE(WITH_SOUND, 1, [Define if you want to use sound])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
|
|
|
dnl Checks for some external libraries that need to be installed
|
|
|
|
AC_LANG(C++)
|
|
|
|
|
|
|
|
|
2008-01-19 18:14:56 +01:00
|
|
|
dnl QT4 -------------------------------------------------------------------------
|
|
|
|
dnl The QT4 check code was taken from the FreeMat-3.0 code by Samit Basu
|
2008-01-27 13:45:09 +01:00
|
|
|
PKG_CHECK_MODULES(QT, QtCore QtGui QtNetwork QtXml >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no")
|
2008-01-19 18:14:56 +01:00
|
|
|
if test "x$HAVE_QT4" = "xyes"; then
|
2008-01-27 13:45:09 +01:00
|
|
|
|
2008-01-19 18:14:56 +01:00
|
|
|
dnl Check needed because in some cases the QtGui includedir
|
|
|
|
dnl doesn't contain the subsystem dir.
|
|
|
|
QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
|
|
|
|
EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
|
|
|
|
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
|
|
|
|
AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
|
2008-01-27 13:45:09 +01:00
|
|
|
|
2008-01-19 18:14:56 +01:00
|
|
|
AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
|
|
|
|
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
|
|
|
|
AC_MSG_WARN([QWidget not found])))
|
2008-01-27 13:45:09 +01:00
|
|
|
|
2008-01-19 18:14:56 +01:00
|
|
|
AC_CHECK_PROGS(QT_MOC, [moc4 moc-qt4 moc], [])
|
|
|
|
AC_CHECK_PROGS(QT_RCC, [rcc4 rcc-qt4 rcc], [])
|
|
|
|
AC_CHECK_PROGS(QT_UIC, [uic4 uic-qt4 uic], [])
|
|
|
|
if (test "$QT_MOC" = ""); then
|
|
|
|
AC_MSG_ERROR([QT4 moc is required.])
|
|
|
|
fi
|
|
|
|
if (test "$QT_RCC" = ""); then
|
|
|
|
AC_MSG_ERROR([QT4 rcc is required.])
|
|
|
|
fi
|
|
|
|
if (test "$QT_UIC" = ""); then
|
|
|
|
AC_MSG_ERROR([QT4 uic is required.])
|
|
|
|
fi
|
2008-01-27 13:45:09 +01:00
|
|
|
|
|
|
|
QT_LIB="-lQtCore -lQtGui -lQtNetwork -lQtXml"
|
2006-01-28 12:29:22 +01:00
|
|
|
fi
|
2008-01-27 13:45:09 +01:00
|
|
|
|
|
|
|
QT_LIBS="$QT_LIB"
|
|
|
|
QT_LDADD="-L$QTDIR/lib $QT_LIBS"
|
2009-03-07 23:56:46 +01:00
|
|
|
JACK_LIBS="$JACK_LIB"
|
|
|
|
JACK_LDADD="$JACK_LIBS"
|
|
|
|
LDFLAGS="$QT_LDADD $JACK_LDADD $LDFLAGS"
|
2008-01-22 19:42:34 +01:00
|
|
|
|
2008-01-27 13:45:09 +01:00
|
|
|
AC_MSG_NOTICE([Set LDFLAGS... $LDFLAGS])
|
2008-01-19 18:14:56 +01:00
|
|
|
|
|
|
|
AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
|
|
|
|
AC_SUBST(QT_CFLAGS)
|
|
|
|
AC_SUBST(QT_LIBS)
|
|
|
|
AC_SUBST(QT_MOC)
|
|
|
|
AC_SUBST(QT_RCC)
|
|
|
|
AC_SUBST(QT_UIC)
|
|
|
|
|
2006-01-28 12:29:22 +01:00
|
|
|
AC_CONFIG_FILES(Makefile linux/Makefile)
|
|
|
|
AC_OUTPUT
|