1 # Process this file with autoconf to produce a configure script.
3 AC_INIT(cygutils, 1.3.1, cygwin@cygwin.com)
4 AC_CONFIG_SRCDIR([config.h.in])
5 AC_CONFIG_AUX_DIR([build-aux])
6 AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2 no-dist-gzip])
7 AM_CONFIG_HEADER([config.h])
10 # Checks for programs.
16 # Checks for libraries.
17 AC_CHECK_LIB(popt, poptPrintHelp)
18 AC_CHECK_FUNC(shmget,[
19 HAVE_INTRINSIC_IPC="yes"
21 HAVE_INTRINSIC_IPC="no"
24 # AC_CHECK_LIB(intl, gettext)
25 AM_GNU_GETTEXT(external,[],[])
26 AM_GNU_GETTEXT_VERSION([0.15])
27 BUILD_INCLUDED_LIBINTL=no
28 USE_INCLUDED_LIBINTL=no
29 AC_SUBST(BUILD_INCLUDED_LIBINTL)
30 AC_SUBST(USE_INCLUDED_LIBINTL)
32 # Checks for header files.
35 AC_CHECK_HEADERS([stdlib.h stddef.h errno.h limits.h malloc.h \
36 ctype.h getopt.h popt.h windows.h])
37 AC_CHECK_HEADERS([string.h strings.h], break)
38 AC_CHECK_HEADERS([stdarg.h varargs.h], break)
39 AC_CHECK_HEADERS([sys/ipc.h sys/sem.h sys/shm.h sys/msg.h])
40 AC_CHECK_HEADERS([langinfo.h sys/param.h fcntl.h unistd.h \
41 termios.h sys/ioctl.h])
42 AC_CHECK_HEADERS([wchar.h])
43 AC_CHECK_HEADERS([locale.h])
44 AC_CHECK_FUNCS([setlocale])
47 # Checks for typedefs, structures, and compiler characteristics.
51 # Checks for library functions.
53 AC_CHECK_FUNCS([strcasecmp strchr strdup strrchr strerror])
54 AC_CHECK_FUNCS([bzero getcwd memset nl_langinfo gettimeofday])
58 dnl should only exist on windows, I hope
59 AC_CHECK_STDCALL_FUNC([OpenClipboard],[void *])
61 dnl Set Conditionals for Makefile.am
62 AM_CONDITIONAL(WITH_WINDOWS_PROGRAMS, test "$ac_cv_func_OpenClipboard" = yes)
63 AM_CONDITIONAL(WITH_NATIVE_IPC_PROGRAMS, test "$HAVE_INTRINSIC_IPC" = yes)
65 AC_CONFIG_FILES([Makefile po/Makefile.in])