summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4ef5b33..61d1350 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,5 +33,25 @@ AC_TYPE_SIZE_T
AC_FUNC_MALLOC
AC_CHECK_FUNCS([mblen memset nl_langinfo pathconf regcomp setlocale strchr strdup strrchr])
+AC_CANONICAL_HOST
+# OS-specific tests
+case "${host_os}" in
+*freebsd*|*dragonfly*)
+ CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS"
+ ;;
+
+*darwin*)
+ CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
+ ;;
+
+*netbsd*)
+ CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS"
+ ;;
+
+*openbsd*|*bitrig*)
+ CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
+ ;;
+esac
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT([smenu.spec])