1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/nvclock.c)
AM_INIT_AUTOMAKE(nvclock, 0.5)
AM_CONFIG_HEADER(config.h)
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CXX
AC_HEADER_STDC
CFLAGS=
USE_GTK=
USE_QT=
AC_MSG_CHECKING([if debug code is wanted])
AC_ARG_ENABLE(debug,[ --enable-debug Enable debug code [default=no]],
dnl temporarily disabled -g and -O2, O2 can lead to screen corruption
if test "$enableval" = "yes"; then \
DEBUG="-DDEBUG -W -Wall"; \
else
DEBUG="--DNO_DEBUG -DNO_CHECK"; \
fi,
enableval=no
DEBUG="-DNO_DEBUG -DNO_CHECK")
AC_MSG_RESULT($enableval)
AC_SUBST(DEBUG)
AC_ARG_ENABLE(gtk, [ --enable-gtk Build Gtk dialog, default=no. ], \
if test "$enableval" = "yes"; then \
USE_GTK=gtk
fi;)
if test "$USE_GTK" ; then \
AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([*** GTK not found!]))
dnl CFLAGS="$CFLAGS $GTK_CFLAGS"
dnl LIBS="$LIBS $GTK_LIBS"
fi
AC_ARG_ENABLE(qt, [ --enable-qt Build Qt dialog, default=no. ], \
if test "$enableval" = "yes"; then \
USE_QT=qt
fi;)
if test "$USE_QT" ; then \
AC_PATH_PROG(PERL,perl)
AC_PATH_PROG(MOC,moc,,$bindir:$QTDIR/bin)
AC_MSG_CHECKING(for Qt >= 2.2.0)
if ! test -r /usr/include/qt/qaction.h; then
AC_MSG_ERROR([ Sorry, but you need Qt version 2.2.0 or higher to compile $PACKAGE])
else
AC_MSG_RESULT(yes)
fi
LIBS="$LIBS"
fi
AC_SUBST(USE_GTK)
AC_SUBST(USE_QT)
AC_SUBST(CFLAGS)
AC_SUBST(LIBS)
RANLIB=ranlib
AC_SUBST(RANLIB)
AC_OUTPUT(src/Makefile
src/backend/Makefile
src/qt/Makefile
src/gtk/Makefile
Makefile)
if test "$USE_QT" ; then \
# echo "Don't forget to run 'perl automoc'"
perl automoc
fi
|