]> cygwin.com Git - cygwin-apps/cygutils.git/blame - configure.ac
Import relevant changes from MinGW and MSYS port
[cygwin-apps/cygutils.git] / configure.ac
CommitLineData
d4a28ab0 1# Process this file with autoconf to produce a configure script.
6492d64c 2AC_PREREQ(2.63)
21e2cd88 3AC_INIT(cygutils, 1.4.0, cygwin@cygwin.com)
d4a28ab0 4AC_CONFIG_SRCDIR([config.h.in])
a15e13ca 5AC_CONFIG_AUX_DIR([build-aux])
2798d970 6AC_CONFIG_MACRO_DIR([m4])
a5139f37 7AM_INIT_AUTOMAKE([1.11 silent-rules -Wall -Werror dist-lzma no-dist-gzip])
d4a28ab0 8AM_CONFIG_HEADER([config.h])
d4a28ab0
CW
9AM_MAINTAINER_MODE
10
65b579cb
CW
11VERSION_MAJOR=`echo $VERSION | cut -f1 -d.`
12VERSION_MINOR=`echo $VERSION | cut -f2 -d.`
13VERSION_PATCH=`echo $VERSION | cut -f3 -d.`
14
15AC_SUBST(VERSION_MAJOR)
16AC_SUBST(VERSION_MINOR)
17AC_SUBST(VERSION_PATCH)
18
21e2cd88 19AC_CANONICAL_HOST
65b579cb 20
d4a28ab0
CW
21# Checks for programs.
22AC_PROG_CC
21006e63 23AC_PROG_CXX
41326bf7 24AM_PROG_CC_C_O
d4a28ab0 25AC_PROG_INSTALL
b773d56f 26AC_PROG_LN_S
d4a28ab0 27
6492d64c
CW
28LT_INIT([win32-dll dlopen disable-static])
29LT_LANG([Windows Resource])
65b579cb 30
d4a28ab0 31# Checks for libraries.
65b579cb
CW
32AC_CHECK_LIB(popt, poptPrintHelp,[
33 AC_DEFINE(HAVE_LIBPOPT,1,[Define to 1 if you have the `popt' library (-lpopt).])])dnl '`
b5edac4c
CW
34AC_CHECK_FUNC(shmget,[
35 HAVE_INTRINSIC_IPC="yes"
9420d22f 36 ],[
b5edac4c 37 HAVE_INTRINSIC_IPC="no"
9420d22f
CW
38 ])
39
5a07c6d2
CW
40# AC_CHECK_LIB(intl, gettext)
41AM_GNU_GETTEXT(external,[],[])
2798d970 42AM_GNU_GETTEXT_VERSION([0.17])
5a07c6d2
CW
43BUILD_INCLUDED_LIBINTL=no
44USE_INCLUDED_LIBINTL=no
45AC_SUBST(BUILD_INCLUDED_LIBINTL)
46AC_SUBST(USE_INCLUDED_LIBINTL)
d4a28ab0 47
65b579cb
CW
48CYGICONS_DLL_VERSION=0
49AC_SUBST(CYGICONS_DLL_VERSION)
50
d4a28ab0
CW
51# Checks for header files.
52AC_HEADER_STDC
bd695173
CW
53AC_HEADER_TIME
54AC_CHECK_HEADERS([stdlib.h stddef.h errno.h limits.h malloc.h \
55ctype.h getopt.h popt.h windows.h])
56AC_CHECK_HEADERS([string.h strings.h], break)
57AC_CHECK_HEADERS([stdarg.h varargs.h], break)
9420d22f 58AC_CHECK_HEADERS([sys/ipc.h sys/sem.h sys/shm.h sys/msg.h])
67358361
CW
59AC_CHECK_HEADERS([langinfo.h sys/param.h fcntl.h unistd.h \
60termios.h sys/ioctl.h])
bd695173 61AC_CHECK_HEADERS([wchar.h])
ec5b9412
CW
62AC_CHECK_HEADERS([locale.h])
63AC_CHECK_FUNCS([setlocale])
67358361 64AC_HEADER_TIOCGWINSZ
d4a28ab0
CW
65
66# Checks for typedefs, structures, and compiler characteristics.
67AC_C_CONST
68AC_STRUCT_TM
69
70# Checks for library functions.
71AC_FUNC_MALLOC
72AC_CHECK_FUNCS([strcasecmp strchr strdup strrchr strerror])
eb7cdcb6 73AC_CHECK_FUNCS([bzero getcwd memset nl_langinfo gettimeofday])
d4a28ab0
CW
74AC_FUNC_LSTAT
75AC_FUNC_STAT
76AC_FUNC_VPRINTF
d2b03e6a 77dnl should only exist on windows, I hope
6492d64c 78AC_CHECK_STDCALL_FUNC([OpenClipboard],[void *])
21e2cd88
CW
79AC_CHECK_DECLS([cygwin_conv_path], [],dnl
80 [AC_MSG_ERROR([At least cygwin-1.7 is required])],dnl
81 [[#include <sys/cygwin.h>]])
d2b03e6a
CW
82
83dnl Set Conditionals for Makefile.am
84AM_CONDITIONAL(WITH_WINDOWS_PROGRAMS, test "$ac_cv_func_OpenClipboard" = yes)
b5edac4c 85AM_CONDITIONAL(WITH_NATIVE_IPC_PROGRAMS, test "$HAVE_INTRINSIC_IPC" = yes)
d4a28ab0 86
65b579cb 87AC_CONFIG_FILES([Makefile po/Makefile.in src/cygicons/cygicons.rc])
6cc111d5 88
d4a28ab0 89AC_OUTPUT
This page took 0.037262 seconds and 5 git commands to generate.