X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=configure.ac;h=a05e8236a4bc2301b40a19d1249420b10cc1e733;hp=d4be8382f66cae1066bf012a2b2c13f677d9e649;hb=14df8308778d04b49582a29d7a2866c7dbb9ccf9;hpb=70d5336ba77f51e7c12c1f0c52179770d636cc08 diff --git a/configure.ac b/configure.ac index d4be838..a05e823 100644 --- a/configure.ac +++ b/configure.ac @@ -36,44 +36,52 @@ AM_CONDITIONAL([NETBSD], [test x$NETBSD = xyes]) # AC_ARG_ENABLE([debug], - [ --enable-debug include debugging symbols and features], + [AS_HELP_STRING([--enable-debug], + [include debugging symbols and code paths])], [debug=$enableval], [debug=no]) AC_ARG_ENABLE([double-precision], - [ --enable-double-precision use doubles instead of floats], + [AS_HELP_STRING([--enable-double-precision], + [use doubles instead of floats])], [double_precision=$enableval], [double_precision=no]) AC_ARG_ENABLE([profile], - [ --enable-profile make a binary with code profiling instructions], + [AS_HELP_STRING([--enable-profile], + [make a binary with code profiling instructions])], [profile=$enableval], [profile=no]) AC_ARG_ENABLE([extra-warnings], - [ --enable-extra-warnings make the gcc compiler give more warnings], + [AS_HELP_STRING([--enable-extra-warnings], + [make the gcc compiler give more warnings])], [extra_warnings=$enableval], [extra_warnings=no]) +AC_ARG_ENABLE([link-sh], + [AS_HELP_STRING([--enable-link-sh], + [give the executable fewer direct dependencies])], + [link_sh=$enableval], + [link_sh=no]) + AC_ARG_ENABLE([clock_gettime], - [ --enable-clock_gettime use clock_gettime() instead of SDL_GetTicks()], + [AS_HELP_STRING([--enable-clock_gettime], + [use clock_gettime() instead of SDL_GetTicks()])], [clock_gettime=$enableval], [clock_gettime=no]) AC_ARG_ENABLE([threads], - [ --enable-threads use threads for concurrency where appropriate], + [AS_HELP_STRING([--enable-threads], + [use threads for concurrency where appropriate])], [threads=$enableval], [threads=no]) -AC_ARG_ENABLE([gtk], - [ --enable-gtk enable GTK+ modal dialogs], - [gtk=$enableval], - [gtk=no]) - -AC_ARG_ENABLE([qt4], - [ --enable-qt4 enable QT modal dialogs], - [qt4=$enableval], - [qt4=no]) +AC_ARG_WITH([gui-toolkit], + [AS_HELP_STRING([--with-gui-toolkit=ARG], + [possible values: none (default), gtk, qt4])], + [gui_toolkit=$withval], + [gui_toolkit=none]) if test x$debug = xyes @@ -105,17 +113,19 @@ then CXXFLAGS="$CXXFLAGS -Wextra -Wno-unused-parameter" fi +AM_CONDITIONAL([LINK_SH], [test x$link_sh = xyes]) + if test x$threads = xyes then AC_DEFINE([USE_THREADS], 1, [Define to 1 if you want to use threads when applicable.]) fi -if test x$gtk = xyes +if test x$gui_toolkit = xgtk then AC_DEFINE([USE_GTK], 1, [Define to 1 if you want to use GTK+ modal dialogs.]) -elif test x$qt4 = xyes +elif test x$gui_toolkit = xqt4 then AC_DEFINE([USE_QT4], 1, [Define to 1 if you want to use QT4 modal dialogs.]) @@ -255,7 +265,7 @@ PKG_CHECK_MODULES([LUA], [lua], AC_MSG_WARN([Missing liblua ($website)])]) ##### GTK+ 2.0 ##### -if test x$gtk = xyes +if test x$gui_toolkit = xgtk then website="http://www.gtk.org/" PKG_CHECK_MODULES([GTK], [gtk+-2.0], @@ -267,15 +277,15 @@ then fi ##### QT4 ##### -if test x$qt4 = xyes +if test x$gui_toolkit = xqt4 then website="http://qt.nokia.com/" - PKG_CHECK_MODULES([QT], [QtGui], - [LIBS="$LIBS $QT_LIBS" - CFLAGS="$CFLAGS $QT_CFLAGS" - CXXFLAGS="$CXXFLAGS $QT_CFLAGS"], + PKG_CHECK_MODULES([QT4], [QtGui], + [LIBS="$LIBS $QT4_LIBS" + CFLAGS="$CFLAGS $QT4_CFLAGS" + CXXFLAGS="$CXXFLAGS $QT4_CFLAGS"], [missing=yes - AC_MSG_WARN([Missing QT ($website)])]) + AC_MSG_WARN([Missing QT4 ($website)])]) fi if test x$missing = xyes @@ -372,6 +382,12 @@ AC_DEFINE_UNQUOTED([VERSION_REVISION], [${VERSION_REVISION:-0}], PVERSION="${VERSION_MAJOR:-0}.${VERSION_MINOR:-0}.${VERSION_REVISION:-0}.0" AC_SUBST([PVERSION]) +if githead=$(git log -n1 --date=short --pretty=format:"%h (%ad)") +then + AC_DEFINE_UNQUOTED([YOINK_GITHEAD], ["$githead"], + [Define to the git commit currently checked out.]) +fi + # # Create the build files.