#
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
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,
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
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
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
AC_TYPE_SIZE_T
-AC_TYPE_SSIZE_T
####
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRTOD
-AC_CHECK_FUNCS([nanosleep strchr strcspn strrchr strstr])
+AC_CHECK_FUNCS([fcntl ioctl nanosleep strchr strcspn strrchr strstr])
if test x$clock_gettime = xyes
then
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.