X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=configure.ac;h=d45b7566fccedba5db34cc4a2e463f2207b81100;hp=d4be8382f66cae1066bf012a2b2c13f677d9e649;hb=85783316365181491a3e3c0c63659972477cebba;hpb=70d5336ba77f51e7c12c1f0c52179770d636cc08 diff --git a/configure.ac b/configure.ac index d4be838..d45b756 100644 --- a/configure.ac +++ b/configure.ac @@ -36,44 +36,58 @@ 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_WITH([gtk], + [AS_HELP_STRING([--with-gtk], + [use gtk2 modal dialogs])], + [gtk=$withval], + [gtk=no]) -AC_ARG_ENABLE([qt4], - [ --enable-qt4 enable QT modal dialogs], - [qt4=$enableval], - [qt4=no]) +AC_ARG_WITH([qt4], + [AS_HELP_STRING([--with-qt4], + [use qt4 modal dialogs; overridden by --with-gtk])], + [qt4=$withval], + [qt4=no]) if test x$debug = xyes @@ -105,6 +119,8 @@ 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, @@ -270,12 +286,18 @@ fi if test x$qt4 = xyes 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$WIN32 = xyes +then + # On Windows, sockets are in the ws2_32 library. + LIBS="$LIBS -lws2_32" fi if test x$missing = xyes @@ -290,7 +312,7 @@ AC_MSG_NOTICE([Checks for header files.]) AC_HEADER_STDBOOL AC_HEADER_STDC -AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h unistd.h]) +AC_CHECK_HEADERS([arpa/inet.h byteswap.h fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h]) BOOST_SMART_PTR BOOST_STRING_ALGO @@ -305,8 +327,8 @@ AC_MSG_NOTICE([Checks for types.]) AC_TYPE_UINT8_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T +AC_TYPE_UINT64_T AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T #### @@ -323,7 +345,7 @@ AC_MSG_NOTICE([Checks for library functions.]) AC_FUNC_ERROR_AT_LINE AC_FUNC_STRTOD -AC_CHECK_FUNCS([nanosleep strchr strcspn strrchr strstr]) +AC_CHECK_FUNCS([fcntl nanosleep strchr strcspn strrchr strstr]) if test x$clock_gettime = xyes then @@ -372,6 +394,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.