This repository has been archived by the owner on Feb 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
129 lines (102 loc) · 2.79 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
AC_PREREQ( 2.59 )
AC_INIT(
[libcstring],
[20180218],
AC_CONFIG_SRCDIR(
[include/libcstring.h.in])
AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])
AC_CONFIG_MACRO_DIR([m4])
dnl Check for host type
AC_CANONICAL_HOST
dnl Check for libtool DLL support
AC_LIBTOOL_WIN32_DLL
dnl Checks for programs
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
AC_PROG_MAKE_SET
AC_PROG_INSTALL
dnl Check for libtool
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl Check for pkg-config
AC_PATH_PROG(PKGCONFIG,[pkg-config])
dnl Support of internationalization (i18n)
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18.1])
dnl Check for compiler language support
AC_C_CONST
AC_C_VOLATILE
dnl Check for large file support
AC_SYS_LARGEFILE
dnl Check if WINAPI support should be enabled
AX_COMMON_CHECK_ENABLE_WINAPI
dnl Check if wide character type should be enabled
AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE
dnl Check for type definitions
AX_TYPES_CHECK_LOCAL
dnl Check if common required headers and functions are available
AX_COMMON_CHECK_LOCAL
dnl Check if libcstring required headers and functions are available
AX_LIBCSTRING_CHECK_LOCAL
dnl Check if tests required headers and functions are available
AX_TESTS_CHECK_LOCAL
dnl Check if DLL support is needed
AS_IF(
[test "x$enable_shared" = xyes],
[AS_CASE(
[$host],
[*cygwin* | *mingw*],
[AC_DEFINE(
[HAVE_DLLMAIN],
[1],
[Define to 1 to enable the DllMain function.])
AC_SUBST(
[HAVE_DLLMAIN],
[1])
dnl Used in tests
AC_SUBST(
[LIBCSTRING_DLL_IMPORT],
["-DLIBCSTRING_DLL_IMPORT"])
])
])
dnl Set additional compiler flags
CFLAGS="$CFLAGS -Wall";
dnl Set the date for the dpkg files
AC_SUBST(
[DPKG_DATE],
[`date -R 2> /dev/null`])
dnl Set the date for the spec file
AC_SUBST(
[SPEC_DATE],
[`date +"%a %b %e %Y" 2> /dev/null`])
dnl Generate Makefiles
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([include/Makefile])
AC_CONFIG_FILES([common/Makefile])
AC_CONFIG_FILES([libcstring/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_CONFIG_FILES([po/Makevars])
AC_CONFIG_FILES([manuals/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([msvscpp/Makefile])
dnl Generate header files
AC_CONFIG_FILES([include/libcstring.h])
AC_CONFIG_FILES([include/libcstring/definitions.h])
AC_CONFIG_FILES([include/libcstring/features.h])
AC_CONFIG_FILES([include/libcstring/types.h])
AC_CONFIG_FILES([libcstring/libcstring_definitions.h])
dnl Generate distribution specific files
AC_CONFIG_FILES([common/types.h])
AC_CONFIG_FILES([dpkg/changelog])
AC_CONFIG_FILES([libcstring/libcstring.rc])
AC_CONFIG_FILES([libcstring.pc])
AC_CONFIG_FILES([libcstring.spec])
dnl Generate a source configuration file
AC_CONFIG_HEADERS([common/config.h])
AC_OUTPUT
dnl Print a summary
AC_MSG_NOTICE([
Features:
Wide character type support: $ac_cv_enable_wide_character_type
]);