aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac215
1 files changed, 215 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..7d27d4b
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,215 @@
1#
2# Alaska Communications UDP Echo Tools
3# Copyright (C) 2020 Alaska Communications
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met:
8#
9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11#
12# 2. Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15#
16# 3. Neither the name of the copyright holder nor the names of its
17# contributors may be used to endorse or promote products derived from
18# this software without specific prior written permission.
19#
20# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
24# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31#
32# configure.ac - automate compiling on a unix platform
33#
34
35# +-=-=-=-=-=-=-=-=-+
36# | |
37# | Autoconf Init |
38# | |
39# +-=-=-=-=-=-=-=-=-+
40
41AC_PREREQ(2.65)
42
43AC_COPYRIGHT([Copyright (C) 2020 Alaska Communications])
44AC_REVISION(0.1)
45AC_INIT([Alaska Communications UDP Echo Tools],[0.0],[david.syzdek@acsalaska.com],[akcom-udpecho])
46
47AC_SUBST([RELEASE_MONTH],["February 2020"])
48
49PACKAGE_COPYRIGHT="Copyright (C) 2020 Alaska Communications"
50AC_DEFINE_UNQUOTED(PACKAGE_COPYRIGHT, ["${PACKAGE_COPYRIGHT}"], [Copyright notice.])
51AC_SUBST([PACKAGE_COPYRIGHT], [${PACKAGE_COPYRIGHT}])
52
53
54# directory locations
55AC_CONFIG_AUX_DIR([build-aux])
56AC_CONFIG_SRCDIR([build-aux/git-tar-name.txt])
57#AC_CONFIG_LIBOBJ_DIR(compat)
58AC_CONFIG_HEADERS([config.h])
59AC_CONFIG_MACRO_DIR([m4])
60
61# determines host type
62AC_CANONICAL_BUILD
63AC_CANONICAL_HOST
64AC_CANONICAL_TARGET
65
66# configures for automake
67AM_INIT_AUTOMAKE(gnu std-options subdir-objects foreign)
68
69# Compilers
70AC_PROG_CC
71#AC_PROG_OBJC
72AC_PROG_CXX
73AM_PROG_CC_C_O
74AC_PROG_LEX
75AC_PROG_YACC
76AC_PROG_INSTALL
77AC_PROG_MAKE_SET
78AC_USE_SYSTEM_EXTENSIONS # replaces AC_AIX AC_GNU_SOURCE AC_MINIX
79AC_C_BIGENDIAN
80AC_C_INLINE
81
82# Version Info:
83# Current -- the current version number of this API
84# Revision -- the revision of the implementation of the API version
85# Age -- How many seqential past API versions is supported by
86# this implementation
87# Format => Current:Revision:Age
88# Convenience macro:
89# AC_BINDLE_LIBTOOL_VERSION_INFO(current, revision, age)
90AC_BINDLE_LIBTOOL_VERSION_INFO(0, 0, 0)
91
92# binary locations
93AC_PATH_PROG([SHELL], sh bash, [AC_MSG_ERROR([missing "sh"])], [$PATH])
94AC_CHECK_TOOLS(AR, ar gar, [AC_MSG_ERROR([missing binutil "ar"])])
95AC_CHECK_TOOLS(LD, ld gld, [AC_MSG_ERROR([missing binutil "ld"])])
96AC_CHECK_TOOLS(NM, nm gnm, [AC_MSG_ERROR([missing binutil "nm"])])
97AC_CHECK_TOOLS(RANLIB, ranlib granlib, [AC_MSG_ERROR([missing binutil "ranlib"])])
98AC_CHECK_TOOLS(STRIP, strip gstrip, [AC_MSG_ERROR([missing binutil "strip"])])
99
100# shell programs
101AC_PROG_AWK
102AC_PROG_EGREP
103AC_PROG_FGREP
104AM_PROG_LEX
105AC_PROG_LN_S
106AC_PROG_MKDIR_P
107AC_PROG_SED
108
109# GNU Libtool Support
110LT_INIT(dlopen disable-fast-install win32-dll)
111
112# check for common functions
113AC_FUNC_ALLOCA
114AC_FUNC_FORK
115AC_FUNC_MALLOC
116AC_FUNC_REALLOC
117AC_FUNC_STRERROR_R
118
119# Type checks
120AC_TYPE_INT8_T
121AC_TYPE_INT16_T
122AC_TYPE_INT32_T
123AC_TYPE_INT64_T
124AC_TYPE_SIZE_T
125AC_TYPE_SSIZE_T
126AC_TYPE_UID_T
127AC_TYPE_UINT8_T
128AC_TYPE_UINT16_T
129AC_TYPE_UINT32_T
130AC_TYPE_UINT64_T
131#AC_CHECK_TYPES([LDAPURLDesc],, [AC_MSG_ERROR([missing required datatype])],[#include <ldap.h>])
132
133# check for required functions
134AC_CHECK_FUNCS([bzero], [], [AC_MSG_ERROR([missing required functions])])
135AC_CHECK_FUNCS([clock_gettime], [], [AC_MSG_ERROR([missing required functions])])
136AC_CHECK_FUNCS([getpass], [], [AC_MSG_ERROR([missing required functions])])
137AC_CHECK_FUNCS([gettimeofday], [], [AC_MSG_ERROR([missing required functions])])
138AC_CHECK_FUNCS([memset], [], [AC_MSG_ERROR([missing required functions])])
139AC_CHECK_FUNCS([regcomp], [], [AC_MSG_ERROR([missing required functions])])
140AC_CHECK_FUNCS([setlocale], [], [AC_MSG_ERROR([missing required functions])])
141AC_CHECK_FUNCS([socket], [], [AC_MSG_ERROR([missing required functions])])
142AC_CHECK_FUNCS([strcasecmp], [], [AC_MSG_ERROR([missing required functions])])
143AC_CHECK_FUNCS([strchr], [], [AC_MSG_ERROR([missing required functions])])
144AC_CHECK_FUNCS([strdup], [], [AC_MSG_ERROR([missing required functions])])
145AC_CHECK_FUNCS([strerror], [], [AC_MSG_ERROR([missing required functions])])
146AC_CHECK_FUNCS([strncasecmp], [], [AC_MSG_ERROR([missing required functions])])
147AC_CHECK_FUNCS([strtol], [], [AC_MSG_ERROR([missing required functions])])
148AC_CHECK_FUNCS([strtoul], [], [AC_MSG_ERROR([missing required functions])])
149
150# check for required libraries
151AC_SEARCH_LIBS([getopt_long], c gnugetopt,,AC_MSG_ERROR([missing required function]))
152AC_SEARCH_LIBS([ldap_dn2str], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
153AC_SEARCH_LIBS([ldap_dnfree], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
154AC_SEARCH_LIBS([ldap_explode_dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
155AC_SEARCH_LIBS([ldap_first_entry], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
156AC_SEARCH_LIBS([ldap_free_urldesc], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
157AC_SEARCH_LIBS([ldap_get_dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
158AC_SEARCH_LIBS([ldap_initialize], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
159AC_SEARCH_LIBS([ldap_result], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
160AC_SEARCH_LIBS([ldap_sasl_bind_s], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
161AC_SEARCH_LIBS([ldap_search_ext], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
162AC_SEARCH_LIBS([ldap_set_option], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
163AC_SEARCH_LIBS([ldap_str2dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
164AC_SEARCH_LIBS([ldap_unbind_ext_s], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
165AC_SEARCH_LIBS([ldap_url_parse], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
166AC_SEARCH_LIBS([ldap_value_free], ldap,,AC_MSG_ERROR([missing required function]), [-llber])
167AC_SEARCH_LIBS([socket], socket,,AC_MSG_ERROR([missing required function]), [-lresolv])
168
169# check for headers
170AC_CHECK_HEADER_STDBOOL
171AC_CHECK_HEADERS([arpa/inet.h],, [AC_MSG_ERROR([missing required header])])
172AC_CHECK_HEADERS([fcntl.h],, [AC_MSG_ERROR([missing required header])])
173AC_CHECK_HEADERS([netdb.h],, [AC_MSG_ERROR([missing required header])])
174AC_CHECK_HEADERS([netinet/in.h],, [AC_MSG_ERROR([missing required header])])
175AC_CHECK_HEADERS([termios.h],, [AC_MSG_ERROR([missing required header])])
176AC_CHECK_HEADERS([ldap.h],, [AC_MSG_ERROR([missing required header])])
177AC_CHECK_HEADERS([getopt.h],, [AC_MSG_ERROR([missing required header])])
178AC_CHECK_HEADERS([signal.h],, [AC_MSG_ERROR([missing required header])])
179AC_CHECK_HEADERS([libintl.h])
180AC_CHECK_HEADERS([malloc.h])
181AC_CHECK_HEADERS([sgtty.h])
182AC_CHECK_HEADERS([sys/socket.h],, [AC_MSG_ERROR([missing required header])])
183AC_CHECK_HEADERS([syslog.h],, [AC_MSG_ERROR([missing required header])])
184AC_CHECK_HEADERS([stddef.h])
185
186# initiates bindle tools macros
187AC_BINDLE(contrib/bindletools)
188
189# determine PACKAGE_VERSION via Git
190AC_BINDLE_GIT_PACKAGE_VERSION([contrib/bindletools/build-aux/git-package-version.sh])
191
192# custom configure options
193AC_BINDLE_ENABLE_WARNINGS([-Wno-padded -Wno-unknown-pragmas], [-Wpadded])
194
195# Creates outputs
196AC_CONFIG_FILES([Makefile])
197AC_OUTPUT
198
199# Show local config
200AC_MSG_NOTICE([ ])
201AC_MSG_NOTICE([ Alaska Communications UDP Echo Tools ($PACKAGE_VERSION)])
202AC_MSG_NOTICE([ ])
203AC_MSG_NOTICE([ Use Warnings $USE_WARNINGS])
204AC_MSG_NOTICE([ Use Strict Warnings $USE_STRICTWARNINGS])
205AC_MSG_NOTICE([ ])
206AC_MSG_NOTICE([ Utilities:])
207AC_MSG_NOTICE([ akcom-udpecho yes])
208AC_MSG_NOTICE([ akcom-udpechod yes])
209AC_MSG_NOTICE([ ])
210AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT])
211AC_MSG_NOTICE([ ])
212AC_MSG_NOTICE([ run 'make all'])
213AC_MSG_NOTICE([ ])
214
215# end of configure.ac