diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/configure.in b/configure.in index 195359ae1..9f3b10c43 100644 --- a/configure.in +++ b/configure.in | |||
@@ -41,13 +41,11 @@ if test "$GCC" = "yes"; then | |||
41 | CFLAGS="$CFLAGS -Wall" | 41 | CFLAGS="$CFLAGS -Wall" |
42 | fi | 42 | fi |
43 | 43 | ||
44 | CFLAGS="$CFLAGS -I. -I${srcdir-.}" | ||
45 | |||
46 | # Check for some target-specific stuff | 44 | # Check for some target-specific stuff |
47 | case "$host" in | 45 | case "$host" in |
48 | *-*-aix*) | 46 | *-*-aix*) |
49 | AFS_LIBS="-lld" | 47 | AFS_LIBS="-lld" |
50 | CFLAGS="$CFLAGS -I/usr/local/include" | 48 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
51 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 49 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
52 | if (test "$LD" != "gcc" && test -z "$blibpath"); then | 50 | if (test "$LD" != "gcc" && test -z "$blibpath"); then |
53 | blibpath="/usr/lib:/lib:/usr/local/lib" | 51 | blibpath="/usr/lib:/lib:/usr/local/lib" |
@@ -77,7 +75,7 @@ case "$host" in | |||
77 | if test -z "$GCC"; then | 75 | if test -z "$GCC"; then |
78 | CFLAGS="$CFLAGS -Ae" | 76 | CFLAGS="$CFLAGS -Ae" |
79 | fi | 77 | fi |
80 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" | 78 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" |
81 | IPADDR_IN_DISPLAY=yes | 79 | IPADDR_IN_DISPLAY=yes |
82 | AC_DEFINE(USE_PIPES) | 80 | AC_DEFINE(USE_PIPES) |
83 | AC_DEFINE(DISABLE_SHADOW) | 81 | AC_DEFINE(DISABLE_SHADOW) |
@@ -88,7 +86,7 @@ case "$host" in | |||
88 | mansubdir=cat | 86 | mansubdir=cat |
89 | ;; | 87 | ;; |
90 | *-*-hpux11*) | 88 | *-*-hpux11*) |
91 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" | 89 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" |
92 | IPADDR_IN_DISPLAY=yes | 90 | IPADDR_IN_DISPLAY=yes |
93 | AC_DEFINE(USE_PIPES) | 91 | AC_DEFINE(USE_PIPES) |
94 | AC_DEFINE(DISABLE_SHADOW) | 92 | AC_DEFINE(DISABLE_SHADOW) |
@@ -99,7 +97,7 @@ case "$host" in | |||
99 | mansubdir=cat | 97 | mansubdir=cat |
100 | ;; | 98 | ;; |
101 | *-*-irix5*) | 99 | *-*-irix5*) |
102 | CFLAGS="$CFLAGS -I/usr/local/include" | 100 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
103 | LDFLAGS="$LDFLAGS" | 101 | LDFLAGS="$LDFLAGS" |
104 | PATH="$PATH:/usr/etc" | 102 | PATH="$PATH:/usr/etc" |
105 | MANTYPE='$(CATMAN)' | 103 | MANTYPE='$(CATMAN)' |
@@ -108,7 +106,7 @@ case "$host" in | |||
108 | AC_DEFINE(BROKEN_INET_NTOA) | 106 | AC_DEFINE(BROKEN_INET_NTOA) |
109 | ;; | 107 | ;; |
110 | *-*-irix6*) | 108 | *-*-irix6*) |
111 | CFLAGS="$CFLAGS -I/usr/local/include" | 109 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
112 | LDFLAGS="$LDFLAGS" | 110 | LDFLAGS="$LDFLAGS" |
113 | PATH="$PATH:/usr/etc" | 111 | PATH="$PATH:/usr/etc" |
114 | MANTYPE='$(CATMAN)' | 112 | MANTYPE='$(CATMAN)' |
@@ -145,10 +143,10 @@ mips-sony-bsd|mips-sony-newsos4) | |||
145 | AC_DEFINE(HAVE_NEXT) | 143 | AC_DEFINE(HAVE_NEXT) |
146 | AC_DEFINE(BROKEN_REALPATH) | 144 | AC_DEFINE(BROKEN_REALPATH) |
147 | AC_DEFINE(USE_PIPES) | 145 | AC_DEFINE(USE_PIPES) |
148 | CFLAGS="$CFLAGS -I/usr/local/include" | 146 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
149 | ;; | 147 | ;; |
150 | *-*-solaris*) | 148 | *-*-solaris*) |
151 | CFLAGS="$CFLAGS -I/usr/local/include" | 149 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
152 | LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib" | 150 | LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib" |
153 | need_dash_r=1 | 151 | need_dash_r=1 |
154 | # hardwire lastlog location (can't detect it on some versions) | 152 | # hardwire lastlog location (can't detect it on some versions) |
@@ -164,7 +162,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
164 | fi | 162 | fi |
165 | ;; | 163 | ;; |
166 | *-*-sunos4*) | 164 | *-*-sunos4*) |
167 | CFLAGS="$CFLAGS -DSUNOS4" | 165 | CPPFLAGS="$CPPFLAGS -DSUNOS4" |
168 | AC_CHECK_FUNCS(getpwanam) | 166 | AC_CHECK_FUNCS(getpwanam) |
169 | conf_utmp_location=/etc/utmp | 167 | conf_utmp_location=/etc/utmp |
170 | conf_wtmp_location=/var/adm/wtmp | 168 | conf_wtmp_location=/var/adm/wtmp |
@@ -174,7 +172,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
174 | mansubdir=cat | 172 | mansubdir=cat |
175 | ;; | 173 | ;; |
176 | *-sni-sysv*) | 174 | *-sni-sysv*) |
177 | CFLAGS="$CFLAGS -I/usr/local/include" | 175 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
178 | LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib" | 176 | LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib" |
179 | MANTYPE='$(CATMAN)' | 177 | MANTYPE='$(CATMAN)' |
180 | AC_DEFINE(IP_TOS_IS_BROKEN) | 178 | AC_DEFINE(IP_TOS_IS_BROKEN) |
@@ -182,7 +180,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
182 | LIBS="$LIBS -lgen -lnsl -lucb" | 180 | LIBS="$LIBS -lgen -lnsl -lucb" |
183 | ;; | 181 | ;; |
184 | *-*-sysv4.2*) | 182 | *-*-sysv4.2*) |
185 | CFLAGS="$CFLAGS -I/usr/local/include" | 183 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
186 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 184 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
187 | MANTYPE='$(CATMAN)' | 185 | MANTYPE='$(CATMAN)' |
188 | mansubdir=cat | 186 | mansubdir=cat |
@@ -190,7 +188,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
190 | enable_suid_ssh=no | 188 | enable_suid_ssh=no |
191 | ;; | 189 | ;; |
192 | *-*-sysv5*) | 190 | *-*-sysv5*) |
193 | CFLAGS="$CFLAGS -I/usr/local/include" | 191 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
194 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 192 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
195 | MANTYPE='$(CATMAN)' | 193 | MANTYPE='$(CATMAN)' |
196 | mansubdir=cat | 194 | mansubdir=cat |
@@ -198,7 +196,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
198 | enable_suid_ssh=no | 196 | enable_suid_ssh=no |
199 | ;; | 197 | ;; |
200 | *-*-sysv*) | 198 | *-*-sysv*) |
201 | CFLAGS="$CFLAGS -I/usr/local/include" | 199 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
202 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 200 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
203 | MANTYPE='$(CATMAN)' | 201 | MANTYPE='$(CATMAN)' |
204 | mansubdir=cat | 202 | mansubdir=cat |
@@ -206,7 +204,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
206 | ;; | 204 | ;; |
207 | *-*-sco3.2v4*) | 205 | *-*-sco3.2v4*) |
208 | AC_DEFINE(USE_PIPES) | 206 | AC_DEFINE(USE_PIPES) |
209 | CFLAGS="$CFLAGS -Dftruncate=chsize -I/usr/local/include" | 207 | CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include" |
210 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 208 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
211 | MANTYPE='$(CATMAN)' | 209 | MANTYPE='$(CATMAN)' |
212 | mansubdir=cat | 210 | mansubdir=cat |
@@ -219,7 +217,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
219 | AC_DEFINE(DISABLE_SHADOW) | 217 | AC_DEFINE(DISABLE_SHADOW) |
220 | ;; | 218 | ;; |
221 | *-*-sco3.2v5*) | 219 | *-*-sco3.2v5*) |
222 | CFLAGS="$CFLAGS -I/usr/local/include" | 220 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
223 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 221 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
224 | MANTYPE='$(CATMAN)' | 222 | MANTYPE='$(CATMAN)' |
225 | mansubdir=cat | 223 | mansubdir=cat |
@@ -254,6 +252,14 @@ AC_ARG_WITH(cflags, | |||
254 | fi | 252 | fi |
255 | ] | 253 | ] |
256 | ) | 254 | ) |
255 | AC_ARG_WITH(cppflags, | ||
256 | [ --with-cppflags Specify additional flags to pass to preprocessor] , | ||
257 | [ | ||
258 | if test "x$withval" != "xno"; then | ||
259 | CPPFLAGS="$CPPFLAGS $withval" | ||
260 | fi | ||
261 | ] | ||
262 | ) | ||
257 | AC_ARG_WITH(ldflags, | 263 | AC_ARG_WITH(ldflags, |
258 | [ --with-ldflags Specify additional flags to pass to linker], | 264 | [ --with-ldflags Specify additional flags to pass to linker], |
259 | [ | 265 | [ |
@@ -396,7 +402,7 @@ AC_ARG_WITH(ssl-dir, | |||
396 | 402 | ||
397 | saved_LIBS="$LIBS" | 403 | saved_LIBS="$LIBS" |
398 | saved_LDFLAGS="$LDFLAGS" | 404 | saved_LDFLAGS="$LDFLAGS" |
399 | saved_CFLAGS="$CFLAGS" | 405 | saved_CPPFLAGS="$CPPFLAGS" |
400 | if test "x$prefix" != "xNONE" ; then | 406 | if test "x$prefix" != "xNONE" ; then |
401 | tryssldir="$tryssldir $prefix" | 407 | tryssldir="$tryssldir $prefix" |
402 | fi | 408 | fi |
@@ -405,7 +411,7 @@ AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [ | |||
405 | for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do | 411 | for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do |
406 | if test ! -z "$ssldir" ; then | 412 | if test ! -z "$ssldir" ; then |
407 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" | 413 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" |
408 | CFLAGS="$saved_CFLAGS -I$ssldir/include" | 414 | CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include" |
409 | if test ! -z "$need_dash_r" ; then | 415 | if test ! -z "$need_dash_r" ; then |
410 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" | 416 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" |
411 | fi | 417 | fi |
@@ -454,7 +460,7 @@ if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; | |||
454 | AC_DEFINE(HAVE_OPENSSL) | 460 | AC_DEFINE(HAVE_OPENSSL) |
455 | dnl Need to recover ssldir - test above runs in subshell | 461 | dnl Need to recover ssldir - test above runs in subshell |
456 | ssldir=$ac_cv_openssldir | 462 | ssldir=$ac_cv_openssldir |
457 | CFLAGS="$saved_CFLAGS -I$ssldir/include" | 463 | CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include" |
458 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" | 464 | LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir" |
459 | if test ! -z "$need_dash_r" ; then | 465 | if test ! -z "$need_dash_r" ; then |
460 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" | 466 | LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir" |
@@ -1057,7 +1063,7 @@ AC_ARG_WITH(kerberos4, | |||
1057 | if test "x$withval" != "xno" ; then | 1063 | if test "x$withval" != "xno" ; then |
1058 | 1064 | ||
1059 | if test "x$withval" != "xyes" ; then | 1065 | if test "x$withval" != "xyes" ; then |
1060 | CFLAGS="$CFLAGS -I${withval}/include" | 1066 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
1061 | LDFLAGS="$LDFLAGS -L${withval}/lib" | 1067 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
1062 | if test ! -z "$need_dash_r" ; then | 1068 | if test ! -z "$need_dash_r" ; then |
1063 | LDFLAGS="$LDFLAGS -R${withval}/lib" | 1069 | LDFLAGS="$LDFLAGS -R${withval}/lib" |
@@ -1067,7 +1073,7 @@ AC_ARG_WITH(kerberos4, | |||
1067 | fi | 1073 | fi |
1068 | else | 1074 | else |
1069 | if test -d /usr/include/kerberosIV ; then | 1075 | if test -d /usr/include/kerberosIV ; then |
1070 | CFLAGS="$CFLAGS -I/usr/include/kerberosIV" | 1076 | CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV" |
1071 | fi | 1077 | fi |
1072 | fi | 1078 | fi |
1073 | 1079 | ||
@@ -1097,7 +1103,7 @@ AC_ARG_WITH(afs, | |||
1097 | if test "x$withval" != "xno" ; then | 1103 | if test "x$withval" != "xno" ; then |
1098 | 1104 | ||
1099 | if test "x$withval" != "xyes" ; then | 1105 | if test "x$withval" != "xyes" ; then |
1100 | CFLAGS="$CFLAGS -I${withval}/include" | 1106 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
1101 | LDFLAGS="$LDFLAGS -L${withval}/lib" | 1107 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
1102 | fi | 1108 | fi |
1103 | 1109 | ||
@@ -1124,7 +1130,7 @@ AC_ARG_WITH(skey, | |||
1124 | if test "x$withval" != "xno" ; then | 1130 | if test "x$withval" != "xno" ; then |
1125 | 1131 | ||
1126 | if test "x$withval" != "xyes" ; then | 1132 | if test "x$withval" != "xyes" ; then |
1127 | CFLAGS="$CFLAGS -I${withval}/include" | 1133 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
1128 | LDFLAGS="$LDFLAGS -L${withval}/lib" | 1134 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
1129 | fi | 1135 | fi |
1130 | 1136 | ||
@@ -1599,11 +1605,12 @@ echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" | |||
1599 | 1605 | ||
1600 | echo "" | 1606 | echo "" |
1601 | 1607 | ||
1602 | echo " Host: ${host}" | 1608 | echo " Host: ${host}" |
1603 | echo " Compiler: ${CC}" | 1609 | echo " Compiler: ${CC}" |
1604 | echo " Compiler flags: ${CFLAGS}" | 1610 | echo " Compiler flags: ${CFLAGS}" |
1605 | echo " Linker flags: ${LDFLAGS}" | 1611 | echo "Preprocessor flags: ${CPPFLAGS}" |
1606 | echo " Libraries: ${LIBS}" | 1612 | echo " Linker flags: ${LDFLAGS}" |
1613 | echo " Libraries: ${LIBS}" | ||
1607 | 1614 | ||
1608 | echo "" | 1615 | echo "" |
1609 | 1616 | ||