]> Dogcows Code - chaz/yoink/blobdiff - configure.ac
incorporated vim's link.sh; -i arg reports commit
[chaz/yoink] / configure.ac
index d4be8382f66cae1066bf012a2b2c13f677d9e649..a05e8236a4bc2301b40a19d1249420b10cc1e733 100644 (file)
@@ -36,44 +36,52 @@ AM_CONDITIONAL([NETBSD], [test x$NETBSD = xyes])
 #
 
 AC_ARG_ENABLE([debug],
 #
 
 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],
                          [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],
                          [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],
                          [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])
 
                          [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],
 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],
                          [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])
 
                          [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
 
 
 if test x$debug = xyes
@@ -105,17 +113,19 @@ then
        CXXFLAGS="$CXXFLAGS -Wextra -Wno-unused-parameter"
 fi
 
        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$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.])
 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.])
 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 #####
                                   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],
 then
        website="http://www.gtk.org/"
        PKG_CHECK_MODULES([GTK], [gtk+-2.0],
@@ -267,15 +277,15 @@ then
 fi
 
 ##### QT4 #####
 fi
 
 ##### QT4 #####
-if test x$qt4 = xyes
+if test x$gui_toolkit = xqt4
 then
        website="http://qt.nokia.com/"
 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
                                          [missing=yes
-                                          AC_MSG_WARN([Missing QT ($website)])])
+                                          AC_MSG_WARN([Missing QT4 ($website)])])
 fi
 
 if test x$missing = xyes
 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])
 
 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.
 
 #
 # Create the build files.
This page took 0.019752 seconds and 4 git commands to generate.