forked from net-snmp/net-snmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
176 lines (158 loc) · 5.73 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Portions of this file are subject to the following copyright. See
# the Net-SNMP's COPYING file for more details and other copyrights
# that may apply:
#
# Portions Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms specified in the COPYING file
# distributed with the Net-SNMP package.
#
# Portions of this file are copyrighted by:
# Copyright (c) 2016 VMware, Inc. All rights reserved.
# Use is subject to license terms specified in the COPYING file
# distributed with the Net-SNMP package.
#
#
# Process this file with autoconf to produce a configure script.
#
AC_INIT([Net-SNMP], [5.8], [[email protected]])
AC_PREREQ([2.63])
AC_CONFIG_SRCDIR([agent/snmpd.c])
AC_REVISION([$Revision$])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(include/net-snmp/net-snmp-config.h)
AC_MSG_CACHE_INIT()
#
# save the configure arguments
#
AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}",
[configure options specified])
CONFIGURE_OPTIONS="\"$ac_configure_args\""
AC_SUBST(CONFIGURE_OPTIONS)
##
# Compilation-related program checks:
##
AC_LANG([C])
AC_PROG_CC
AC_PROG_CPP
LINKCC=${LINKCC-"$CC"}
AC_SUBST(LINKCC)
AC_C_CONST
AC_C_INLINE
# libtool stuff for shared/static libraries.
#
LT_PREREQ([2.2.6])
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
AC_SUBST(LIBTOOL_DEPS)
#
# Define _GNU_SOURCE for asprintf(); _ALL_SOURCE and _THREAD_SAFE for struct
# random_data on AIX; __EXTENSIONS__ for Solaris.
#
CPPFLAGS="-D_GNU_SOURCE -D_ALL_SOURCE -D_THREAD_SAFE -D__EXTENSIONS__ $CPPFLAGS"
##
## Recommended structure:
##
# information on the package
# checks for programs
# checks for libraries
# checks for header files
# checks for types
# checks for structures
# checks for compiler characteristics
# checks for library functions
# checks for system services
m4_include([configure.d/config_net_snmp_config_h])
m4_include([configure.d/config_project_with_enable])
##
# Protect against CFLAGS with -Werror which causes failures for some tests
# (e.g. it causes type mismatches in the AC_CV_FUNCS call)
##
noerr_CFLAGS="$CFLAGS"
CFLAGS=`echo $CFLAGS | sed 's/-Werror[[^ ]]*//g'`
CFLAGS_without_Werror=$CFLAGS
export CFLAGS
m4_include([configure.d/config_project_manual])
m4_include([configure.d/config_os_progs])
m4_include([configure.d/config_project_paths])
m4_include([configure.d/config_os_headers])
AC_CACHE_SAVE
m4_include([configure.d/config_project_ipv6_types])
m4_include([configure.d/config_modules_lib])
AC_CACHE_SAVE
m4_include([configure.d/config_os_libs1])
m4_include([configure.d/config_modules_agent])
m4_include([configure.d/config_os_misc1])
m4_include([configure.d/config_os_libs2])
AC_CACHE_SAVE
m4_include([configure.d/config_project_perl_python])
m4_include([configure.d/config_os_misc2])
m4_include([configure.d/config_project_types])
m4_include([configure.d/config_os_misc3])
AC_CACHE_SAVE
m4_include([configure.d/config_os_functions])
m4_include([configure.d/config_os_struct_members])
m4_include([configure.d/config_os_misc4])
AC_CACHE_SAVE
##
# Add back in the original CFLAGS setting
##
CFLAGS="$noerr_CFLAGS ${CFLAGS#$CFLAGS_without_Werror}"
export CFLAGS
#
# define the agent libraries variables
#
AC_SUBST(LMIBLIBS)
AC_SUBST(AGENTLIBS)
AC_SUBST(OTHERAGENTLIBOBJS)
AC_SUBST(OTHERAGENTLIBLOBJS)
AC_SUBST(OTHERAGENTLIBLFTS)
AC_SUBST(PARTIALTARGETFLAGS)
AC_SUBST(ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE)
AC_CONFIG_FILES([Makefile:Makefile.top:Makefile.in:Makefile.rules])
AC_CONFIG_FILES([snmplib/Makefile:Makefile.top:snmplib/Makefile.in:Makefile.rules:snmplib/Makefile.depend])
AC_CONFIG_FILES([apps/Makefile:Makefile.top:apps/Makefile.in:Makefile.rules:apps/Makefile.depend])
AC_CONFIG_FILES([apps/snmpnetstat/Makefile:Makefile.top:apps/snmpnetstat/Makefile.in:Makefile.rules:apps/snmpnetstat/Makefile.depend])
AC_CONFIG_FILES([agent/Makefile:Makefile.top:agent/Makefile.in:Makefile.rules:agent/Makefile.depend])
AC_CONFIG_FILES([agent/helpers/Makefile:Makefile.top:agent/helpers/Makefile.in:Makefile.rules:agent/helpers/Makefile.depend])
AC_CONFIG_FILES([agent/mibgroup/Makefile:Makefile.top:agent/mibgroup/Makefile.in:Makefile.rules:agent/mibgroup/Makefile.depend])
AC_CONFIG_FILES([local/Makefile:Makefile.top:local/Makefile.in:Makefile.rules])
AC_CONFIG_FILES([testing/Makefile:Makefile.top:testing/Makefile.in])
AC_CONFIG_FILES([man/Makefile:Makefile.top:man/Makefile.in:Makefile.rules])
AC_CONFIG_FILES([mibs/Makefile:Makefile.top:mibs/Makefile.in:Makefile.rules])
AC_CONFIG_FILES([net-snmp-config:net-snmp-config.in],
[chmod +x net-snmp-config])
AC_CONFIG_FILES([net-snmp-create-v3-user:net-snmp-create-v3-user.in],
[chmod +x net-snmp-create-v3-user])
AC_CONFIG_FILES([netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in])
AC_CONFIG_FILES([dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in])
AC_CONFIG_FILES([local/snmpconf])
AC_CONFIG_COMMANDS([default], echo timestamp > stamp-h)
#
# protect PACKAGE_* variables
#
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AC_OUTPUT
AC_MSG_CACHE_DISPLAY()
# Local Variables:
# mode: Autoconf
# comment-start: "#"
# End: