summaryrefslogtreecommitdiffstats
path: root/src/configure.in
blob: b1b9049a39ca7bdb392f6f2b96619c705358c47d (plain)
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
AC_INIT(aclocal.m4)
CONFIG_RULES
dnl
dnl
dnl We cannot use the autoconf form as it is too generic and sets other
dnl variables. This is only for the purpose of changing the link options.
AC_MSG_CHECKING(whether we are using GNU C)
AC_CACHE_VAL(krb5_cv_prog_gcc,
[
AC_EGREP_CPP(yes,[#ifdef __GNUC__
yes;
#endif],krb5_cv_prog_gcc=yes,krb5_cv_prog_gcc=no)
])dnl
AC_MSG_RESULT($krb5_cv_prog_gcc)
dnl
ifelse([AC_MSG_CHECKING([for build host])
AC_CACHE_VAL(krb5_cv_host, [export CC
AC_CANONICAL_HOST
krb5_cv_host=$host])
AC_MSG_RESULT($krb5_cv_host)
dnl
dnl Do the shared library grot....
dnl
AC_ARG_ENABLE([shared],
[  --enable-shared         build shared libraries],[
case $krb5_cv_host in
*-*-netbsd*)
	echo "Enabling shared libraries for NetBSD...."
	krb5_cv_shlibs_cflags=-fpic
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
krb5_cv_shlibs_versioned_filenames=yes # version in filename of library
	krb5_cv_shlibs_need_nover=no
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag=
	krb5_cv_noshlibs_ldflag="-static"
	krb5_cv_shlibs_sym_ufo="-u "
	krb5_cv_shlibs_dirhead="-Wl,-R -Wl,"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_shlibs_tail_comp=
	krb5_cv_shlibs_enabled=yes
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
	;;
*-*-linux*)
	echo "Enabling shared libraries for Linux...."
	krb5_cv_shlibs_cflags=-fPIC
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_versioned_filenames=yes
	krb5_cv_shlibs_need_nover=yes
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag=
	krb5_cv_noshlibs_ldflag="-static"
	krb5_cv_shlibs_sym_ufo="-u "
	krb5_cv_shlibs_dirhead="-Wl,-rpath -Wl,"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_shlibs_tail_comp=
	krb5_cv_shlibs_enabled=yes
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
	;;
*-*-aix*)
	echo "Enabling shared libraries for AIX...."
	krb5_cv_shlibs_cflags=
	krb5_cv_shlibs_ext=a
# need_nover *must* be no if versioned_filenames = no
	krb5_cv_shlibs_need_nover=no 
	krb5_cv_shlibs_versioned_filenames=no
	krb5_cv_noshlibs_ext=do-not-make
	krb5_cv_shlibs_dir=
	if test $krb5_cv_prog_gcc = yes ; then
	  krb5_cv_shlibs_ldflag="-Xlinker -bex4:\$(BUILDTOP)/util/aix.bincmds"
	  krb5_cv_noshlibs_ldflag=
	else
	  krb5_cv_shlibs_ldflag="-bex4:\$(BUILDTOP)/util/aix.bincmds"
	  krb5_cv_noshlibs_ldflag=
	fi
	krb5_cv_shlibs_sym_ufo=
	krb5_cv_shlibs_dirhead="-L"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=no
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_staticlibs_enabled=
	krb5_cv_shlibs_tail_comp=
	krb5_cv_shlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=no
	# This ugly line indicates to put $LIBPATH: into the path only if set
	krb5_cv_shlibs_run_libpath="\$\$LIBPATH\$\${LIBPATH:+:}/usr/lib:/lib"
	krb5_cv_shlibs_run_rldroot=no
	;;
mips-sni-sysv4)
	echo "Enabling shared libraries for Sinix...."
	if test $krb5_cv_prog_gcc = yes; then
		krb5_cv_shlibs_cflags=-fpic
	else
		krb5_cv_shlibs_cflags=-Kpic
	fi
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_versioned_filenames=yes
	krb5_cv_shlibs_need_nover=yes
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag="-dy"
	krb5_cv_noshlibs_ldflag="-dn"
	krb5_cv_shlibs_sym_ufo="-u "
	krb5_cv_shlibs_dirhead="-R"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_shlibs_tail_comp=
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
	;;
*-*-solaris*)
	echo "Enabling shared libraries for Solaris...."
	if test $krb5_cv_prog_gcc = yes; then
		krb5_cv_shlibs_cflags=-fpic
	else
		krb5_cv_shlibs_cflags=-Kpic
	fi
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_versioned_filenames=yes
	krb5_cv_shlibs_need_nover=yes
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag="-dy"
	krb5_cv_noshlibs_ldflag="-dn"
	krb5_cv_shlibs_sym_ufo="-u "
	krb5_cv_shlibs_dirhead="-R "
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_shlibs_tail_comp=
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
	;;
*-*-sunos*)
	echo "Enabling shared libraries for SunOS...."
	if test $krb5_cv_prog_gcc = yes; then
		krb5_cv_shlibs_cflags=-fpic
	else
		krb5_cv_shlibs_cflags=-Kpic
	fi
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_versioned_filenames=yes
	krb5_cv_shlibs_need_nover=yes
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag="-dy"
	krb5_cv_noshlibs_ldflag="-dn"
	krb5_cv_shlibs_sym_ufo="-u "
	krb5_cv_shlibs_dirhead="-L"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=no
	krb5_cv_shlibs_tail_comp=
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
	;;
alpha-dec-osf*)
	echo "Enabling shared libraries for Alpha OSF...."
	krb5_cv_shlibs_cflags=
	krb5_cv_shlibs_ext=so
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_versioned_filenames=yes
	krb5_cv_shlibs_need_nover=yes
	krb5_cv_shlibs_dir=
	krb5_cv_shlibs_ldflag="-call_shared"
	krb5_cv_noshlibs_ldflag="-non_shared"
	krb5_cv_shlibs_sym_ufo="-expect_unresolved "
	krb5_cv_shlibs_dirhead="-rpath "
	krb5_cv_exe_need_dirs=no
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=yes
	krb5_cv_shlibs_tail_comp=
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_enabled=yes
	# OSF/1 needs a dummy rldroot to bypath -rpath and therefore
	# needs all library paths indicated
	krb5_cv_shlibs_run_ldpath="/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib"
	krb5_cv_shlibs_run_rldroot=dummy
	krb5_cv_shlibs_run_libpath=no
	if test ! -f so_locations; then
		cp -p /usr/shlib/so_locations .
	fi
	if test $krb5_cv_prog_gcc = yes; then
		krb5_cv_shlibs_ldflag=
		krb5_cv_noshlibs_ldflag="-static"
	fi
	;;
*-*-hpux*)
	echo "Enabling shared libraries for HP-UX >=9.x ...."
	krb5_cv_shlibs_cflags=+z
	krb5_cv_shlibs_ext=sl
	krb5_cv_noshlibs_ext=a
	krb5_cv_shlibs_dir=shared
	krb5_cv_shlibs_ldflag="-Wl,-a,default"
	krb5_cv_noshlibs_ldflag=
	krb5_cv_shlibs_sym_ufo=
	krb5_cv_shlibs_dirhead="-Wl,+b,"
	krb5_cv_exe_need_dirs=yes
	krb5_cv_shlibs_use_dirs=yes
	krb5_cv_shlibs_use_colon_dirs=yes
	krb5_cv_shlibs_tail_comp=
	krb5_cv_shlibs_enabled=yes
	krb5_cv_staticlibs_enabled=yes
	krb5_cv_shlibs_run_ldpath=default
	krb5_cv_shlibs_run_libpath=no
	krb5_cv_shlibs_run_rldroot=no
  	;;
*) 
	echo " "
	echo "Shared libraries not supported on $krb5_cv_host"
	exit 1
	;;
esac],[krb5_cv_shlibs_cflags=
krb5_cv_shlibs_ext=
krb5_cv_noshlibs_ext=a
krb5_cv_shlibs_need_nover=yes
krb5_cv_shlibs_dir=
krb5_cv_shlibs_ldflag=
krb5_cv_noshlibs_ldflag=
krb5_cv_shlibs_sym_ufo=
krb5_cv_shlibs_dirhead=
krb5_cv_shlibs_tail_comp=
krb5_cv_staticlibs_enabled=yes
krb5_cv_shlibs_enabled=])
])
dnl
dnl The following lines are so that configure --help gives some global 
dnl configuration options.
KRB5_LIB_AUX
AC_KRB5_TCL
AC_ARG_ENABLE([athena],
[  --enable-athena         build with MIT Project Athena configuration],,)
dnl
if test -z "$KRB4_LIB"; then
kadminv4=""
krb524=""
libkrb4=""
KRB4=""
else
kadminv4=kadmin.v4
krb524=krb524
libkrb4=lib/krb4
KRB4=krb4
fi
AC_SUBST(KRB4)
AC_SUBST(krb524)
dnl
dnl Begin autoconf tests for the Makefiles generated out of the top-level
dnl configure.in...
dnl
AC_PROG_INSTALL
AC_PROG_ARCHIVE
AC_PROG_ARCHIVE_ADD
AC_PROG_RANLIB
AC_CHECK_FUNCS(memmove)
KRB5_BUILD_LIBOBJS
KRB5_BUILD_LIBRARY
dnl
dnl For util/makeshlib.  (Is SHLIB_TAIL_COMP still necessary?!?)
dnl
if test $krb5_cv_prog_gcc = yes ; then
     HAVE_GCC=yes
     else HAVE_GCC=
fi
AC_SUBST(HAVE_GCC)
HOST_TYPE=$krb5_cv_host
AC_SUBST(HOST_TYPE)
SHLIB_TAIL_COMP=$krb5_cv_shlibs_tail_comp
AC_SUBST(SHLIB_TAIL_COMP)
dnl
dnl
AC_CONFIG_SUBDIRS(util/et util/ss util/profile util/pty util/db2 include lib/crypto lib/krb5 lib/des425 $libkrb4 lib/krb5util lib/kdb lib/gssapi lib/rpc lib/kadm5 $krb524 kdc kadmin slave clients appl tests)
K5_GEN_MAKEFILE(.)
K5_GEN_MAKEFILE(util)
K5_GEN_MAKEFILE(util/send-pr)
K5_GEN_MAKEFILE(util/dyn, lib libobj)
K5_GEN_MAKEFILE(lib)
K5_GEN_MAKEFILE(config-files)
K5_GEN_MAKEFILE(gen-manpages)
K5_AC_OUTPUT