-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
80 lines (61 loc) · 2.2 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
dnl Process this file with autoconf to produce a configure script.
AC_INIT([PlibC], [0.1.7],[plibc-devel@lists.sf.net])
AC_CANONICAL_TARGET
dnl Every other copy of the package version number gets its value from here
AM_INIT_AUTOMAKE(PlibC, 0.1.7)
AM_SILENT_RULES([yes])
dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AC_CONFIG_HEADER([config.h])
AC_SUBST(VERSION)
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D__USE_MINGW_ANSI_STDIO=1 -D_CRT_NON_CONFORMING_SWPRINTFS=1 -DUSE_IPV6"
ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)
AC_CANONICAL_HOST
# Check system type
case "$target_os" in
*cygwin*)
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
;;
*mingw*)
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
;;
*)
;;
esac
# We define the paths here, because MinGW/GCC expands paths
# passed through the command line ("-DLOCALEDIR=..."). This would
# lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
# not contain the actual installation.
AC_DEFINE_DIR([LOCALEDIR], [datadir/locale], [gettext catalogs])
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
# dynamic libraries
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_LIBLTDL_INSTALLABLE
AC_PROG_LIBTOOL
AC_LIB_LTDL
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
AC_SYS_LARGEFILE
AC_CHECK_LIB(intl, gettext)
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h )
AC_CHECK_DECLS(getnameinfo, [], [], [[#include <tcpip.h>]])
AC_CHECK_DECLS([getaddrinfo, freeaddrinfo], [], [], [[#include <ws2tcpip.h>]])
AC_CHECK_DECLS([_stati64, _wstat32i64, _stat32, _wstat32])
AC_HEADER_MAJOR
AC_FUNC_ALLOCA
AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS(mkfifo)
AC_CHECK_FUNC(mknod)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_OUTPUT(Makefile src/Makefile src/include/Makefile plibc.lsm plibc.spec)