Bump to release 1.4.0
[smenu.git] / configure.ac
blob24443088bce1ad5479a3970230277cf93f5c10da
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 m4_define(my_version, [m4_esyscmd([tr -d '\n' < version])])
6 AC_PREREQ([2.71])
7 AC_INIT([smenu],[my_version],[p.gen.progs@gmail.com])
8 AC_CONFIG_SRCDIR([smenu.c])
9 AC_CONFIG_HEADERS([config.h])
10 AC_CONFIG_AUX_DIR([build-aux])
11 AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2 foreign -Wall])
12 AM_SILENT_RULES([yes])
14 # Checks for programs.
15 AC_USE_SYSTEM_EXTENSIONS
16 AC_PROG_AWK
17 AC_PROG_CC
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20 AC_PROG_MAKE_SET
22 AC_SEARCH_LIBS([tgetent], [tinfo curses ncursesw ncurses], [HAVE_CURSES=True])
24 # clock_gettime is in librt on *-*-osf5.1 and on glibc < 2.17, so add -lrt
25 AC_SEARCH_LIBS([clock_gettime], [rt], [
26   AC_DEFINE([HAVE_CLOCK_GETTIME],1,
27   [Define to 1 if you have the `clock_gettime' function])])
29 # Checks for libraries.
31 # Checks for header files.
32 AC_CHECK_INCLUDES_DEFAULT
33 AC_PROG_EGREP
35 AC_CHECK_HEADERS([fcntl.h limits.h langinfo.h locale.h stdint.h stdlib.h \
36                   string.h sys/ioctl.h sys/time.h termios.h unistd.h wchar.h])
38 # Checks for typedefs, structures, and compiler characteristics.
39 AC_TYPE_SIZE_T
41 # Checks for library functions.
42 AC_FUNC_MALLOC
43 AC_FUNC_REALLOC
44 AC_CHECK_FUNCS([mblen memset nl_langinfo pathconf regcomp setlocale])
45 AC_CHECK_FUNCS([strchr strrchr strspn strcasecmp])
47 AC_CANONICAL_HOST
48 # OS-specific tests
49 case "${host_os}" in
50 *freebsd*|*dragonfly*)
51   CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS"
52   ;;
54 *darwin*)
55   CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
56   ;;
58 *netbsd*)
59   CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS"
60   ;;
62 *openbsd*|*bitrig*)
63   CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
64   ;;
65 esac
67 AC_CONFIG_FILES([Makefile])
68 AC_OUTPUT