| [1] | 1 | dnl aclocal.m4 generated automatically by aclocal 1.3 | 
|---|
|  | 2 |  | 
|---|
|  | 3 | dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. | 
|---|
|  | 4 | dnl This Makefile.in is free software; the Free Software Foundation | 
|---|
|  | 5 | dnl gives unlimited permission to copy and/or distribute it, | 
|---|
|  | 6 | dnl with or without modifications, as long as this notice is preserved. | 
|---|
|  | 7 |  | 
|---|
|  | 8 | dnl This program is distributed in the hope that it will be useful, | 
|---|
|  | 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without | 
|---|
|  | 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A | 
|---|
|  | 11 | dnl PARTICULAR PURPOSE. | 
|---|
|  | 12 |  | 
|---|
|  | 13 | # | 
|---|
|  | 14 | # Check to make sure that the build environment is sane. | 
|---|
|  | 15 | # | 
|---|
|  | 16 | AC_DEFUN([AM_INIT_AUTOMAKE], | 
|---|
|  | 17 | [ | 
|---|
| [43] | 18 | AC_REQUIRE([AC_PROG_INSTALL]) | 
|---|
| [1] | 19 | PACKAGE=[$1] | 
|---|
|  | 20 | AC_SUBST(PACKAGE) | 
|---|
|  | 21 | VERSION=[$2] | 
|---|
|  | 22 | AC_SUBST(VERSION) | 
|---|
|  | 23 | dnl test to see if srcdir already configured | 
|---|
|  | 24 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | 
|---|
|  | 25 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | 
|---|
|  | 26 | fi | 
|---|
|  | 27 | ifelse([$3],, | 
|---|
|  | 28 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") | 
|---|
|  | 29 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) | 
|---|
|  | 30 | AC_REQUIRE([AC_PROG_MAKE_SET])]) | 
|---|
|  | 31 |  | 
|---|
|  | 32 |  | 
|---|
|  | 33 | # Define a conditional. | 
|---|
|  | 34 |  | 
|---|
|  | 35 | AC_DEFUN([AM_CONDITIONAL], | 
|---|
|  | 36 | [AC_SUBST($1_TRUE) | 
|---|
|  | 37 | AC_SUBST($1_FALSE) | 
|---|
|  | 38 | if $2; then | 
|---|
|  | 39 | $1_TRUE= | 
|---|
|  | 40 | $1_FALSE='#' | 
|---|
|  | 41 | else | 
|---|
|  | 42 | $1_TRUE='#' | 
|---|
|  | 43 | $1_FALSE= | 
|---|
|  | 44 | fi]) | 
|---|
|  | 45 |  | 
|---|
|  | 46 |  | 
|---|
|  | 47 | AC_DEFUN([sh_run_prog], | 
|---|
|  | 48 | [if test "$cross_compiling" = "yes"; then | 
|---|
|  | 49 | AC_MSG_ERROR([Can not probe non-portable values when cross compiling]) | 
|---|
|  | 50 | fi | 
|---|
|  | 51 | cat > conftest.$ac_ext <<EOF | 
|---|
|  | 52 | [#]line __oline__ "configure" | 
|---|
|  | 53 | #include "confdefs.h" | 
|---|
|  | 54 | ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus | 
|---|
|  | 55 | extern "C" void exit(int); | 
|---|
|  | 56 | #endif | 
|---|
|  | 57 | ]) | 
|---|
|  | 58 | [$1] | 
|---|
|  | 59 | EOF | 
|---|
|  | 60 | if AC_TRY_EVAL(ac_link) && test -s conftest && $2=`(./conftest 2>/dev/null)` | 
|---|
|  | 61 | then | 
|---|
|  | 62 | dnl Don't remove the temporary files here, so they can be examined. | 
|---|
|  | 63 | ifelse([$3], , :, [$3]) | 
|---|
|  | 64 | else | 
|---|
|  | 65 | echo "configure: failed program was:" >&AC_FD_CC | 
|---|
|  | 66 | cat conftest.$ac_ext >&AC_FD_CC | 
|---|
|  | 67 | ifelse([$4], , , [  rm -fr conftest* | 
|---|
|  | 68 | $4 | 
|---|
|  | 69 | ]) | 
|---|
|  | 70 | fi | 
|---|
|  | 71 | rm -fr conftest* ]) | 
|---|
|  | 72 |  | 
|---|
|  | 73 | dnl fs type number of the proc filing system | 
|---|
|  | 74 | AC_DEFUN([sh_procfs_id], | 
|---|
|  | 75 | [AC_MSG_CHECKING([f_type of /proc]) | 
|---|
|  | 76 | AC_CACHE_VAL([sh_cv_proc_fstype], | 
|---|
|  | 77 | [sh_run_prog( | 
|---|
|  | 78 | changequote(<<, >>)dnl | 
|---|
|  | 79 | <<#include <stdio.h> | 
|---|
|  | 80 | #ifdef HAVE_STDLIB_H | 
|---|
|  | 81 | #include <stdlib.h> | 
|---|
|  | 82 | #endif /* HAVE_STDLIB_H */ | 
|---|
|  | 83 | #ifdef HAVE_UNISTD_H | 
|---|
|  | 84 | #include <unistd.h> | 
|---|
|  | 85 | #endif /* HAVE_UNISTD_H */ | 
|---|
|  | 86 | #ifdef HAVE_SYS_VFS_H | 
|---|
|  | 87 | #include <sys/vfs.h> | 
|---|
|  | 88 | #endif | 
|---|
|  | 89 | #ifndef Q | 
|---|
|  | 90 | #define __Q(x) #x | 
|---|
|  | 91 | #define Q(x) __Q(x) | 
|---|
|  | 92 | #endif | 
|---|
|  | 93 | int main(void) | 
|---|
|  | 94 | { | 
|---|
|  | 95 | struct statfs fsbuf; | 
|---|
|  | 96 | long ft; | 
|---|
|  | 97 | if (statfs("/", &fsbuf)!=0) | 
|---|
|  | 98 | exit(1); | 
|---|
|  | 99 | ft=fsbuf.f_type; | 
|---|
|  | 100 | if (statfs("/proc/1", &fsbuf)!=0) | 
|---|
|  | 101 | exit(1); | 
|---|
|  | 102 | if (ft!=fsbuf.f_type) | 
|---|
|  | 103 | printf("0x%08lx", fsbuf.f_type); | 
|---|
|  | 104 | else | 
|---|
|  | 105 | puts("statfs useless"); | 
|---|
|  | 106 | exit(0); | 
|---|
|  | 107 | } >> | 
|---|
|  | 108 | changequote([, ]), sh_cv_proc_fstype,, sh_cv_proc_fstype="a fatal error occured")]) | 
|---|
|  | 109 | AC_MSG_RESULT($sh_cv_proc_fstype) | 
|---|
|  | 110 | if test "${sh_cv_proc_fstype}" = "a fatal error occured"; then | 
|---|
|  | 111 | $1=$2 | 
|---|
|  | 112 | $4 | 
|---|
|  | 113 | else if test "${sh_cv_proc_fstype}" = "statfs useless"; then | 
|---|
|  | 114 | $1=$2 | 
|---|
|  | 115 | $4 | 
|---|
|  | 116 | else | 
|---|
|  | 117 | $1=$sh_cv_proc_fstype | 
|---|
|  | 118 | $3 | 
|---|
|  | 119 | fi; fi ]) | 
|---|
|  | 120 |  | 
|---|
|  | 121 | # Check whether mlock is broken (hpux 10.20 raises a SIGBUS if mlock | 
|---|
|  | 122 | # is not called from uid 0 (not tested whether uid 0 works) | 
|---|
|  | 123 | dnl AC_CHECK_MLOCK | 
|---|
|  | 124 | dnl | 
|---|
|  | 125 | define([AC_CHECK_MLOCK], | 
|---|
|  | 126 | [ AC_CHECK_FUNCS(mlock) | 
|---|
|  | 127 | if test "$ac_cv_func_mlock" = "yes"; then | 
|---|
|  | 128 | AC_MSG_CHECKING(whether mlock is broken) | 
|---|
|  | 129 | AC_CACHE_VAL(ac_cv_have_broken_mlock, | 
|---|
|  | 130 | AC_TRY_RUN([ | 
|---|
|  | 131 | #include <stdlib.h> | 
|---|
|  | 132 | #include <unistd.h> | 
|---|
|  | 133 | #include <errno.h> | 
|---|
|  | 134 | #include <sys/mman.h> | 
|---|
|  | 135 | #include <sys/types.h> | 
|---|
|  | 136 | #include <fcntl.h> | 
|---|
|  | 137 |  | 
|---|
|  | 138 | int main() | 
|---|
|  | 139 | { | 
|---|
|  | 140 | char *pool; | 
|---|
|  | 141 | int err; | 
|---|
|  | 142 | long int pgsize = getpagesize(); | 
|---|
|  | 143 |  | 
|---|
|  | 144 | pool = malloc( 4096 + pgsize ); | 
|---|
|  | 145 | if( !pool ) | 
|---|
|  | 146 | return 2; | 
|---|
|  | 147 | pool += (pgsize - ((long int)pool % pgsize)); | 
|---|
|  | 148 |  | 
|---|
|  | 149 | err = mlock( pool, 4096 ); | 
|---|
|  | 150 | if( !err || errno == EPERM ) | 
|---|
|  | 151 | return 0; /* okay */ | 
|---|
|  | 152 |  | 
|---|
|  | 153 | return 1;  /* hmmm */ | 
|---|
|  | 154 | } | 
|---|
|  | 155 |  | 
|---|
|  | 156 | ], | 
|---|
|  | 157 | ac_cv_have_broken_mlock="no", | 
|---|
|  | 158 | ac_cv_have_broken_mlock="yes", | 
|---|
|  | 159 | ac_cv_have_broken_mlock="assume-no" | 
|---|
|  | 160 | ) | 
|---|
|  | 161 | ) | 
|---|
|  | 162 | if test "$ac_cv_have_broken_mlock" = "yes"; then | 
|---|
|  | 163 | AC_DEFINE(HAVE_BROKEN_MLOCK) | 
|---|
|  | 164 | AC_MSG_RESULT(yes) | 
|---|
|  | 165 | else | 
|---|
|  | 166 | if test "$ac_cv_have_broken_mlock" = "no"; then | 
|---|
|  | 167 | AC_MSG_RESULT(no) | 
|---|
|  | 168 | else | 
|---|
|  | 169 | AC_MSG_RESULT(assuming no) | 
|---|
|  | 170 | fi | 
|---|
|  | 171 | fi | 
|---|
|  | 172 | fi | 
|---|
|  | 173 | ]) | 
|---|
|  | 174 |  | 
|---|
|  | 175 | dnl @synopsis AC_FUNC_VSNPRINTF | 
|---|
|  | 176 | dnl | 
|---|
|  | 177 | dnl Check whether there is a reasonably sane vsnprintf() function installed. | 
|---|
|  | 178 | dnl "Reasonably sane" in this context means never clobbering memory beyond | 
|---|
|  | 179 | dnl the buffer supplied, and having a sensible return value.  It is | 
|---|
|  | 180 | dnl explicitly allowed not to NUL-terminate the return value, however. | 
|---|
|  | 181 | dnl | 
|---|
|  | 182 | dnl @version $Id: ac_func_vsnprintf.m4,v 1.1 2001/07/26 02:00:21 guidod Exp $ | 
|---|
|  | 183 | dnl @author Gaute Strokkenes <gs234@cam.ac.uk> | 
|---|
|  | 184 | dnl | 
|---|
|  | 185 | AC_DEFUN([SL_CHECK_VSNPRINTF], | 
|---|
|  | 186 | [AC_CACHE_CHECK(for working vsnprintf, | 
|---|
|  | 187 | ac_cv_func_vsnprintf, | 
|---|
|  | 188 | [AC_TRY_RUN( | 
|---|
|  | 189 | [#include <stdio.h> | 
|---|
|  | 190 | #include <stdarg.h> | 
|---|
|  | 191 |  | 
|---|
|  | 192 | int | 
|---|
|  | 193 | doit(char * s, ...) | 
|---|
|  | 194 | { | 
|---|
|  | 195 | char buffer[32]; | 
|---|
|  | 196 | va_list args; | 
|---|
|  | 197 | int r; | 
|---|
|  | 198 |  | 
|---|
|  | 199 | buffer[5] = 'X'; | 
|---|
|  | 200 |  | 
|---|
|  | 201 | va_start(args, s); | 
|---|
|  | 202 | r = vsnprintf(buffer, 5, s, args); | 
|---|
|  | 203 | va_end(args); | 
|---|
|  | 204 |  | 
|---|
|  | 205 | /* -1 is pre-C99, 7 is C99. R.W. 17.01.2003 disallow -1 */ | 
|---|
|  | 206 |  | 
|---|
|  | 207 | if (r != 7) | 
|---|
|  | 208 | exit(1); | 
|---|
|  | 209 |  | 
|---|
|  | 210 | /* We deliberately do not care if the result is NUL-terminated or | 
|---|
|  | 211 | not, since this is easy to work around like this.  */ | 
|---|
|  | 212 |  | 
|---|
|  | 213 | buffer[4] = 0; | 
|---|
|  | 214 |  | 
|---|
|  | 215 | /* Simple sanity check.  */ | 
|---|
|  | 216 |  | 
|---|
|  | 217 | if (strcmp(buffer, "1234")) | 
|---|
|  | 218 | exit(1); | 
|---|
|  | 219 |  | 
|---|
|  | 220 | if (buffer[5] != 'X') | 
|---|
|  | 221 | exit(1); | 
|---|
|  | 222 |  | 
|---|
|  | 223 | exit(0); | 
|---|
|  | 224 | } | 
|---|
|  | 225 |  | 
|---|
|  | 226 | int | 
|---|
|  | 227 | main(void) | 
|---|
|  | 228 | { | 
|---|
|  | 229 | doit("1234567"); | 
|---|
|  | 230 | exit(1); | 
|---|
|  | 231 | }], ac_cv_func_vsnprintf=yes, ac_cv_func_vsnprintf=no, ac_cv_func_vsnprintf=no)]) | 
|---|
|  | 232 | dnl Note that the default is to be pessimistic in the case | 
|---|
|  | 233 | dnl of cross compilation. | 
|---|
|  | 234 | dnl If you know that the target has a sensible vsnprintf(), | 
|---|
|  | 235 | dnl you can get around this | 
|---|
|  | 236 | dnl by setting ac_func_vsnprintf to yes, as described in the Autoconf manual. | 
|---|
|  | 237 | if test $ac_cv_func_vsnprintf = yes; then | 
|---|
|  | 238 | : | 
|---|
|  | 239 | else | 
|---|
|  | 240 | AC_DEFINE(HAVE_BROKEN_VSNPRINTF, 1, | 
|---|
|  | 241 | [Define if you have a broken version of the `vsnprintf' function.]) | 
|---|
|  | 242 | fi | 
|---|
|  | 243 | ])# AC_FUNC_VSNPRINTF | 
|---|
|  | 244 |  | 
|---|
|  | 245 | dnl SH_CHECK_TYPEDEF(TYPE, HAVE_NAME) | 
|---|
|  | 246 | dnl Check whether a typedef exists and create a #define $2 if it exists | 
|---|
|  | 247 | dnl | 
|---|
|  | 248 | AC_DEFUN([SH_CHECK_TYPEDEF], | 
|---|
|  | 249 | [ AC_MSG_CHECKING(for $1 typedef) | 
|---|
|  | 250 | sh_cv_typedef_foo=`echo sh_cv_typedef_$1 | sed -e 's% %_%g'` | 
|---|
|  | 251 | AC_CACHE_VAL( $sh_cv_typedef_foo, | 
|---|
|  | 252 | [AC_TRY_COMPILE([#include <stdlib.h> | 
|---|
|  | 253 | #include <sys/types.h>], [ | 
|---|
|  | 254 | #undef $1 | 
|---|
|  | 255 | int a = sizeof($1); | 
|---|
|  | 256 | ], sh_cv_typedef=yes, sh_cv_typedef=no )]) | 
|---|
|  | 257 | AC_MSG_RESULT($sh_cv_typedef) | 
|---|
|  | 258 | if test "$sh_cv_typedef" = yes; then | 
|---|
|  | 259 | AC_DEFINE($2) | 
|---|
|  | 260 | sh_$2=yes | 
|---|
|  | 261 | else | 
|---|
|  | 262 | sh_$2=no | 
|---|
|  | 263 | fi | 
|---|
|  | 264 | ]) | 
|---|
|  | 265 |  | 
|---|
|  | 266 |  | 
|---|
|  | 267 |  | 
|---|
|  | 268 | dnl ********************** | 
|---|
|  | 269 | dnl *** va_copy checks *** | 
|---|
|  | 270 | dnl ********************** | 
|---|
|  | 271 | AC_DEFUN([SL_CHECK_VA_COPY], | 
|---|
|  | 272 | [AC_MSG_CHECKING(for va_copy()) | 
|---|
|  | 273 | AC_CACHE_VAL(sh_cv_va_copy,[ | 
|---|
|  | 274 | AC_TRY_RUN([ | 
|---|
|  | 275 | #include <stdarg.h> | 
|---|
|  | 276 | void f (int i, ...) { | 
|---|
|  | 277 | va_list args1, args2; | 
|---|
|  | 278 | va_start (args1, i); | 
|---|
|  | 279 | va_copy (args2, args1); | 
|---|
|  | 280 | if (va_arg (args2, int) != 42) | 
|---|
|  | 281 | exit (1); | 
|---|
|  | 282 | if (va_arg (args1, int) != 42) | 
|---|
|  | 283 | exit (1); | 
|---|
|  | 284 | va_end (args1); va_end (args2); | 
|---|
|  | 285 | } | 
|---|
|  | 286 | int main() { | 
|---|
|  | 287 | f (0, 42); | 
|---|
|  | 288 | return 0; | 
|---|
|  | 289 | }], | 
|---|
|  | 290 | sh_cv_va_copy=yes | 
|---|
|  | 291 | , | 
|---|
|  | 292 | sh_cv_va_copy=no | 
|---|
|  | 293 | , | 
|---|
|  | 294 | sh_cv_va_copy=no) | 
|---|
|  | 295 | ]) | 
|---|
|  | 296 | AC_MSG_RESULT($sh_cv_va_copy) | 
|---|
|  | 297 | AC_MSG_CHECKING(for __va_copy()) | 
|---|
|  | 298 | AC_CACHE_VAL(sh_cv___va_copy,[ | 
|---|
|  | 299 | AC_TRY_RUN([ | 
|---|
|  | 300 | #include <stdarg.h> | 
|---|
|  | 301 | void f (int i, ...) { | 
|---|
|  | 302 | va_list args1, args2; | 
|---|
|  | 303 | va_start (args1, i); | 
|---|
|  | 304 | __va_copy (args2, args1); | 
|---|
|  | 305 | if (va_arg (args2, int) != 42) | 
|---|
|  | 306 | exit (1); | 
|---|
|  | 307 | if (va_arg (args1, int) != 42) | 
|---|
|  | 308 | exit (1); | 
|---|
|  | 309 | va_end (args1); va_end (args2); | 
|---|
|  | 310 | } | 
|---|
|  | 311 | int main() { | 
|---|
|  | 312 | f (0, 42); | 
|---|
|  | 313 | return 0; | 
|---|
|  | 314 | }], | 
|---|
|  | 315 | sh_cv___va_copy=yes | 
|---|
|  | 316 | , | 
|---|
|  | 317 | sh_cv___va_copy=no | 
|---|
|  | 318 | , | 
|---|
|  | 319 | sh_cv___va_copy=no) | 
|---|
|  | 320 | ]) | 
|---|
|  | 321 | AC_MSG_RESULT($sh_cv___va_copy) | 
|---|
|  | 322 | AC_MSG_CHECKING(whether va_lists can be copied by value) | 
|---|
|  | 323 | AC_CACHE_VAL(sh_cv_va_val_copy,[ | 
|---|
|  | 324 | AC_TRY_RUN([ | 
|---|
|  | 325 | #include <stdarg.h> | 
|---|
|  | 326 | void f (int i, ...) { | 
|---|
|  | 327 | va_list args1, args2; | 
|---|
|  | 328 | va_start (args1, i); | 
|---|
|  | 329 | args2 = args1; | 
|---|
|  | 330 | if (va_arg (args2, int) != 42) | 
|---|
|  | 331 | exit (1); | 
|---|
|  | 332 | if (va_arg (args1, int) != 42) | 
|---|
|  | 333 | exit (1); | 
|---|
|  | 334 | va_end (args1); va_end (args2); | 
|---|
|  | 335 | } | 
|---|
|  | 336 | int main() { | 
|---|
|  | 337 | f (0, 42); | 
|---|
|  | 338 | return 0; | 
|---|
|  | 339 | }], | 
|---|
|  | 340 | sh_cv_va_val_copy=yes | 
|---|
|  | 341 | , | 
|---|
|  | 342 | sh_cv_va_val_copy=no | 
|---|
|  | 343 | , | 
|---|
|  | 344 | sh_cv_va_val_copy=no) | 
|---|
|  | 345 | ]) | 
|---|
|  | 346 | if test "x$sh_cv_va_copy" = "xyes"; then | 
|---|
|  | 347 | AC_DEFINE(VA_COPY, va_copy) | 
|---|
|  | 348 | else if test "x$sh_cv___va_copy" = "xyes"; then | 
|---|
|  | 349 | AC_DEFINE(VA_COPY, __va_copy) | 
|---|
|  | 350 | fi | 
|---|
|  | 351 | fi | 
|---|
|  | 352 | if test "x$sh_cv_va_val_copy" = "xno"; then | 
|---|
|  | 353 | AC_DEFINE(VA_COPY_AS_ARRAY) | 
|---|
|  | 354 | fi | 
|---|
|  | 355 | AC_MSG_RESULT($sh_cv_va_val_copy) | 
|---|
|  | 356 | ]) | 
|---|
|  | 357 |  | 
|---|
|  | 358 |  | 
|---|
|  | 359 | dnl SH_INIT_PARSE_ARGS() | 
|---|
|  | 360 | m4_define([SH_INIT_PARSE_ARGS], | 
|---|
|  | 361 | [ | 
|---|
|  | 362 | m4_divert_push([PARSE_ARGS])dnl | 
|---|
|  | 363 |  | 
|---|
|  | 364 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | 
|---|
|  | 365 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | 
|---|
|  | 366 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | 
|---|
|  | 367 | as_cr_digits='0123456789' | 
|---|
|  | 368 | as_cr_alnum=$as_cr_Letters$as_cr_digits | 
|---|
|  | 369 |  | 
|---|
|  | 370 | # Sed expression to map a string onto a valid CPP name. | 
|---|
|  | 371 | as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g" | 
|---|
|  | 372 |  | 
|---|
|  | 373 | as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'" | 
|---|
|  | 374 | # IFS | 
|---|
|  | 375 | # We need space, tab and new line, in precisely that order. | 
|---|
|  | 376 | as_nl=' | 
|---|
|  | 377 | ' | 
|---|
|  | 378 | IFS="   $as_nl" | 
|---|
|  | 379 |  | 
|---|
|  | 380 | # CDPATH. | 
|---|
|  | 381 | $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } | 
|---|
|  | 382 |  | 
|---|
|  | 383 |  | 
|---|
|  | 384 | # Initialize some variables set by options. | 
|---|
|  | 385 | ac_init_help= | 
|---|
|  | 386 | ac_init_version=false | 
|---|
|  | 387 | # The variables have the same names as the options, with | 
|---|
|  | 388 | # dashes changed to underlines. | 
|---|
|  | 389 | cache_file=/dev/null | 
|---|
|  | 390 | AC_SUBST(exec_prefix, NONE)dnl | 
|---|
|  | 391 | no_create= | 
|---|
|  | 392 | no_recursion= | 
|---|
|  | 393 | AC_SUBST(prefix, NONE)dnl | 
|---|
|  | 394 | program_prefix=NONE | 
|---|
|  | 395 | program_suffix=NONE | 
|---|
|  | 396 | AC_SUBST(program_transform_name, [s,x,x,])dnl | 
|---|
|  | 397 | silent= | 
|---|
|  | 398 | site= | 
|---|
|  | 399 | srcdir= | 
|---|
|  | 400 | verbose= | 
|---|
|  | 401 | x_includes=NONE | 
|---|
|  | 402 | x_libraries=NONE | 
|---|
|  | 403 | DESTDIR= | 
|---|
| [68] | 404 | SH_ENABLE_OPTS="db-reload xml-log message-queue login-watch process-check port-check mounts-check userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp" | 
|---|
| [1] | 405 | SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file" | 
|---|
|  | 406 |  | 
|---|
|  | 407 | # Installation directory options. | 
|---|
|  | 408 | # These are left unexpanded so users can "make install exec_prefix=/foo" | 
|---|
|  | 409 | # and all the variables that are supposed to be based on exec_prefix | 
|---|
|  | 410 | # by default will actually change. | 
|---|
|  | 411 | dnl Use braces instead of parens because sh, perl, etc. also accept them. | 
|---|
|  | 412 | sbindir='${exec_prefix}/sbin' | 
|---|
|  | 413 | sysconfdir='${prefix}/etc' | 
|---|
|  | 414 | localstatedir='${prefix}/var' | 
|---|
|  | 415 | mandir='${prefix}/share/man' | 
|---|
|  | 416 |  | 
|---|
|  | 417 | AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl | 
|---|
|  | 418 | AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl | 
|---|
|  | 419 | AC_SUBST([localstatedir],  ['${prefix}/var'])dnl | 
|---|
|  | 420 | AC_SUBST([mandir],         ['${prefix}/share/man'])dnl | 
|---|
|  | 421 |  | 
|---|
|  | 422 |  | 
|---|
|  | 423 | # Initialize some other variables. | 
|---|
|  | 424 | subdirs= | 
|---|
|  | 425 | MFLAGS= MAKEFLAGS= | 
|---|
|  | 426 | SHELL=${CONFIG_SHELL-/bin/sh} | 
|---|
|  | 427 | # Maximum number of lines to put in a shell here document. | 
|---|
|  | 428 | ac_max_here_lines=12 | 
|---|
|  | 429 |  | 
|---|
|  | 430 | ac_prev= | 
|---|
|  | 431 | for ac_option | 
|---|
|  | 432 | do | 
|---|
|  | 433 |  | 
|---|
|  | 434 | # If the previous option needs an argument, assign it. | 
|---|
|  | 435 | if test -n "$ac_prev"; then | 
|---|
|  | 436 | eval "$ac_prev=\$ac_option" | 
|---|
|  | 437 | ac_prev= | 
|---|
|  | 438 | continue | 
|---|
|  | 439 | fi | 
|---|
|  | 440 |  | 
|---|
|  | 441 | case "$ac_option" in | 
|---|
|  | 442 | changequote(, )dnl | 
|---|
|  | 443 | *=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | 
|---|
|  | 444 | changequote([, ])dnl | 
|---|
|  | 445 | *) ac_optarg= ;; | 
|---|
|  | 446 | esac | 
|---|
|  | 447 |  | 
|---|
|  | 448 | # Accept the important Cygnus configure options, so we can diagnose typos. | 
|---|
|  | 449 |  | 
|---|
|  | 450 | case "$ac_option" in | 
|---|
|  | 451 |  | 
|---|
|  | 452 | -build | --build | --buil | --bui | --bu) | 
|---|
|  | 453 | ac_prev=build_alias ;; | 
|---|
|  | 454 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | 
|---|
|  | 455 | build_alias="$ac_optarg" ;; | 
|---|
|  | 456 |  | 
|---|
|  | 457 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | 
|---|
|  | 458 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | 
|---|
|  | 459 | ac_prev=cache_file ;; | 
|---|
|  | 460 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | 
|---|
|  | 461 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | 
|---|
|  | 462 | cache_file="$ac_optarg" ;; | 
|---|
|  | 463 |  | 
|---|
|  | 464 | --config-cache | -C) | 
|---|
|  | 465 | cache_file=config.cache ;; | 
|---|
|  | 466 |  | 
|---|
|  | 467 | -disable-* | --disable-*) | 
|---|
|  | 468 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | 
|---|
|  | 469 | # Reject names that are not valid shell variable names. | 
|---|
|  | 470 | expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 471 | AC_MSG_ERROR([invalid feature name: $ac_feature]) | 
|---|
|  | 472 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | 
|---|
|  | 473 | ac_enable_check_opt=no | 
|---|
|  | 474 | for f in ${SH_ENABLE_OPTS} | 
|---|
|  | 475 | do | 
|---|
|  | 476 | f=`echo $f | sed 's/-/_/g'` | 
|---|
|  | 477 | if test x${f} = x"${ac_feature}" | 
|---|
|  | 478 | then | 
|---|
|  | 479 | ac_enable_check_opt=yes | 
|---|
|  | 480 | fi | 
|---|
|  | 481 | done | 
|---|
|  | 482 | if test x${ac_enable_check_opt} = xno | 
|---|
|  | 483 | then | 
|---|
|  | 484 | AC_MSG_ERROR([unrecognized option: $ac_option | 
|---|
|  | 485 | Try `$[0] --help' for more information.]) | 
|---|
|  | 486 | fi | 
|---|
|  | 487 | eval "enable_$ac_feature=no" ;; | 
|---|
|  | 488 |  | 
|---|
|  | 489 | -enable-* | --enable-*) | 
|---|
|  | 490 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'` | 
|---|
|  | 491 | # Reject names that are not valid shell variable names. | 
|---|
|  | 492 | expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 493 | AC_MSG_ERROR([invalid feature name: $ac_feature]) | 
|---|
|  | 494 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | 
|---|
|  | 495 | case $ac_option in | 
|---|
|  | 496 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | 
|---|
|  | 497 | *) ac_optarg=yes ;; | 
|---|
|  | 498 | esac | 
|---|
|  | 499 | ac_enable_check_opt=no | 
|---|
|  | 500 | for f in ${SH_ENABLE_OPTS} | 
|---|
|  | 501 | do | 
|---|
|  | 502 | f=`echo $f | sed 's/-/_/g'` | 
|---|
|  | 503 | if test x${f} = x"${ac_feature}" | 
|---|
|  | 504 | then | 
|---|
|  | 505 | ac_enable_check_opt=yes | 
|---|
|  | 506 | fi | 
|---|
|  | 507 | done | 
|---|
|  | 508 | if test x${ac_enable_check_opt} = xno | 
|---|
|  | 509 | then | 
|---|
|  | 510 | AC_MSG_ERROR([unrecognized option: $ac_option | 
|---|
|  | 511 | Try `$[0] --help' for more information.]) | 
|---|
|  | 512 | fi | 
|---|
|  | 513 | eval "enable_$ac_feature='$ac_optarg'" ;; | 
|---|
|  | 514 |  | 
|---|
|  | 515 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | 
|---|
|  | 516 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | 
|---|
|  | 517 | | --exec | --exe | --ex) | 
|---|
|  | 518 | ac_prev=exec_prefix | 
|---|
|  | 519 | ac_exec_prefix_set="yes" | 
|---|
|  | 520 | ;; | 
|---|
|  | 521 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | 
|---|
|  | 522 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | 
|---|
|  | 523 | | --exec=* | --exe=* | --ex=*) | 
|---|
|  | 524 | exec_prefix="$ac_optarg" | 
|---|
|  | 525 | ac_exec_prefix_set="yes" | 
|---|
|  | 526 | ;; | 
|---|
|  | 527 |  | 
|---|
|  | 528 | -gas | --gas | --ga | --g) | 
|---|
|  | 529 | # Obsolete; use --with-gas. | 
|---|
|  | 530 | with_gas=yes ;; | 
|---|
|  | 531 |  | 
|---|
|  | 532 | -help | --help | --hel | --he | -h) | 
|---|
|  | 533 | ac_init_help=long ;; | 
|---|
|  | 534 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | 
|---|
|  | 535 | ac_init_help=recursive ;; | 
|---|
|  | 536 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | 
|---|
|  | 537 | ac_init_help=short ;; | 
|---|
|  | 538 |  | 
|---|
|  | 539 | -host | --host | --hos | --ho) | 
|---|
|  | 540 | ac_prev=host_alias ;; | 
|---|
|  | 541 | -host=* | --host=* | --hos=* | --ho=*) | 
|---|
|  | 542 | host_alias="$ac_optarg" ;; | 
|---|
|  | 543 |  | 
|---|
|  | 544 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | 
|---|
|  | 545 | | --localstate | --localstat | --localsta | --localst \ | 
|---|
|  | 546 | | --locals | --local | --loca | --loc | --lo) | 
|---|
|  | 547 | ac_prev=localstatedir | 
|---|
|  | 548 | ac_localstatedir_set="yes" | 
|---|
|  | 549 | ;; | 
|---|
|  | 550 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | 
|---|
|  | 551 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | 
|---|
|  | 552 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | 
|---|
|  | 553 | localstatedir="$ac_optarg" | 
|---|
|  | 554 | ac_localstatedir_set="yes" | 
|---|
|  | 555 | ;; | 
|---|
|  | 556 |  | 
|---|
|  | 557 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | 
|---|
|  | 558 | ac_prev=mandir | 
|---|
|  | 559 | ac_mandir_set="yes" | 
|---|
|  | 560 | ;; | 
|---|
|  | 561 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | 
|---|
|  | 562 | mandir="$ac_optarg" | 
|---|
|  | 563 | ac_mandir_set="yes" | 
|---|
|  | 564 | ;; | 
|---|
|  | 565 |  | 
|---|
|  | 566 | -nfp | --nfp | --nf) | 
|---|
|  | 567 | # Obsolete; use --without-fp. | 
|---|
|  | 568 | with_fp=no ;; | 
|---|
|  | 569 |  | 
|---|
|  | 570 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | 
|---|
|  | 571 | | --no-cr | --no-c | -n) | 
|---|
|  | 572 | no_create=yes ;; | 
|---|
|  | 573 |  | 
|---|
|  | 574 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | 
|---|
|  | 575 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | 
|---|
|  | 576 | no_recursion=yes ;; | 
|---|
|  | 577 |  | 
|---|
|  | 578 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | 
|---|
|  | 579 | ac_prev=prefix | 
|---|
|  | 580 | ac_prefix_set="yes" | 
|---|
|  | 581 | ;; | 
|---|
|  | 582 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | 
|---|
|  | 583 | prefix="$ac_optarg" | 
|---|
|  | 584 | ac_prefix_set="yes" | 
|---|
|  | 585 | ;; | 
|---|
|  | 586 |  | 
|---|
|  | 587 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | 
|---|
|  | 588 | | -silent | --silent | --silen | --sile | --sil) | 
|---|
|  | 589 | silent=yes ;; | 
|---|
|  | 590 |  | 
|---|
|  | 591 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | 
|---|
|  | 592 | ac_prev=sbindir | 
|---|
|  | 593 | ac_sbindir_set="yes" | 
|---|
|  | 594 | ;; | 
|---|
|  | 595 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | 
|---|
|  | 596 | | --sbi=* | --sb=*) | 
|---|
|  | 597 | sbindir="$ac_optarg" | 
|---|
|  | 598 | ac_sbindir_set="yes" | 
|---|
|  | 599 | ;; | 
|---|
|  | 600 |  | 
|---|
|  | 601 | -bindir | --bindir | --bindi | --bind | --bin | --bi | --b) | 
|---|
|  | 602 | echo "WARNING: bindir will be ignored, use sbindir" | 
|---|
|  | 603 | ;; | 
|---|
|  | 604 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* \ | 
|---|
|  | 605 | | --bi=* | --b=*) | 
|---|
|  | 606 | echo "WARNING: bindir will be ignored, use sbindir" | 
|---|
|  | 607 | ;; | 
|---|
|  | 608 |  | 
|---|
|  | 609 | -datadir | --datadir) | 
|---|
|  | 610 | echo "WARNING: datadir will be ignored" | 
|---|
|  | 611 | ;; | 
|---|
|  | 612 | -datadir=* | --datadir=*) | 
|---|
|  | 613 | echo "WARNING: datadir will be ignored" | 
|---|
|  | 614 | ;; | 
|---|
|  | 615 |  | 
|---|
|  | 616 | -includedir | --includedir) | 
|---|
|  | 617 | echo "WARNING: includedir will be ignored" | 
|---|
|  | 618 | ;; | 
|---|
|  | 619 | -includedir=* | --includedir=*) | 
|---|
|  | 620 | echo "WARNING: includedir will be ignored" | 
|---|
|  | 621 | ;; | 
|---|
|  | 622 |  | 
|---|
|  | 623 | -infodir | --infodir) | 
|---|
|  | 624 | echo "WARNING: infodir will be ignored" | 
|---|
|  | 625 | ;; | 
|---|
|  | 626 | -infodir=* | --infodir=*) | 
|---|
|  | 627 | echo "WARNING: infodir will be ignored" | 
|---|
|  | 628 | ;; | 
|---|
|  | 629 |  | 
|---|
|  | 630 | -libdir | --libdir) | 
|---|
|  | 631 | echo "WARNING: libdir will be ignored" | 
|---|
|  | 632 | ;; | 
|---|
|  | 633 | -libdir=* | --libdir=*) | 
|---|
|  | 634 | echo "WARNING: libdir will be ignored" | 
|---|
|  | 635 | ;; | 
|---|
|  | 636 |  | 
|---|
|  | 637 | -libexecdir | --libexecdir) | 
|---|
|  | 638 | echo "WARNING: libexecdir will be ignored" | 
|---|
|  | 639 | ;; | 
|---|
|  | 640 | -libexecdir=* | --libexecdir=*) | 
|---|
|  | 641 | echo "WARNING: libexecdir will be ignored" | 
|---|
|  | 642 | ;; | 
|---|
|  | 643 |  | 
|---|
|  | 644 | -sharedstatedir | --sharedstatedir) | 
|---|
|  | 645 | echo "WARNING: sharedstatedir will be ignored" | 
|---|
|  | 646 | ;; | 
|---|
|  | 647 | -sharedstatedir=* | --sharedstatedir=*) | 
|---|
|  | 648 | echo "WARNING: sharedstatedir will be ignored" | 
|---|
|  | 649 | ;; | 
|---|
|  | 650 |  | 
|---|
|  | 651 | -site | --site | --sit) | 
|---|
|  | 652 | ac_prev=site ;; | 
|---|
|  | 653 | -site=* | --site=* | --sit=*) | 
|---|
|  | 654 | site="$ac_optarg" ;; | 
|---|
|  | 655 |  | 
|---|
|  | 656 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | 
|---|
|  | 657 | ac_prev=srcdir ;; | 
|---|
|  | 658 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | 
|---|
|  | 659 | srcdir="$ac_optarg" ;; | 
|---|
|  | 660 |  | 
|---|
|  | 661 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | 
|---|
|  | 662 | | --syscon | --sysco | --sysc | --sys | --sy) | 
|---|
|  | 663 | ac_prev=sysconfdir | 
|---|
|  | 664 | ac_sysconfdir_set="yes" | 
|---|
|  | 665 | ;; | 
|---|
|  | 666 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | 
|---|
|  | 667 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | 
|---|
|  | 668 | sysconfdir="$ac_optarg" | 
|---|
|  | 669 | ac_sysconfdir_set="yes" | 
|---|
|  | 670 | ;; | 
|---|
|  | 671 |  | 
|---|
|  | 672 | -target | --target | --targe | --targ | --tar | --ta | --t) | 
|---|
|  | 673 | ac_prev=target_alias ;; | 
|---|
|  | 674 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | 
|---|
|  | 675 | target_alias="$ac_optarg" ;; | 
|---|
|  | 676 |  | 
|---|
|  | 677 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | 
|---|
|  | 678 | verbose=yes ;; | 
|---|
|  | 679 |  | 
|---|
|  | 680 | -version | --version | --versio | --versi | --vers) | 
|---|
|  | 681 | ac_init_version=: ;; | 
|---|
|  | 682 |  | 
|---|
|  | 683 |  | 
|---|
|  | 684 | -with-* | --with-*) | 
|---|
|  | 685 | ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'` | 
|---|
|  | 686 | # Reject names that are not valid shell variable names. | 
|---|
|  | 687 | expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 688 | AC_MSG_ERROR([invalid package name: $ac_package]) | 
|---|
|  | 689 | ac_package=`echo $ac_package| sed 's/-/_/g'` | 
|---|
|  | 690 | case $ac_option in | 
|---|
|  | 691 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | 
|---|
|  | 692 | *) ac_optarg=yes ;; | 
|---|
|  | 693 | esac | 
|---|
|  | 694 | ac_with_check_opt=no | 
|---|
|  | 695 | for f in ${SH_WITH_OPTS} | 
|---|
|  | 696 | do | 
|---|
|  | 697 | f=`echo $f | sed 's/-/_/g'` | 
|---|
|  | 698 | if test x${f} = x"${ac_package}" | 
|---|
|  | 699 | then | 
|---|
|  | 700 | ac_with_check_opt=yes | 
|---|
|  | 701 | fi | 
|---|
|  | 702 | done | 
|---|
|  | 703 | if test x${ac_with_check_opt} = xno | 
|---|
|  | 704 | then | 
|---|
|  | 705 | AC_MSG_ERROR([unrecognized option: $ac_option | 
|---|
|  | 706 | Try `$[0] --help' for more information.]) | 
|---|
|  | 707 | fi | 
|---|
|  | 708 | eval "with_$ac_package='$ac_optarg'" ;; | 
|---|
|  | 709 |  | 
|---|
|  | 710 | -without-* | --without-*) | 
|---|
|  | 711 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` | 
|---|
|  | 712 | # Reject names that are not valid shell variable names. | 
|---|
|  | 713 | expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 714 | AC_MSG_ERROR([invalid package name: $ac_package]) | 
|---|
|  | 715 | ac_package=`echo $ac_package | sed 's/-/_/g'` | 
|---|
|  | 716 | ac_with_check_opt=no | 
|---|
|  | 717 | for f in ${SH_WITH_OPTS} | 
|---|
|  | 718 | do | 
|---|
|  | 719 | f=`echo $f | sed 's/-/_/g'` | 
|---|
|  | 720 | if test x${f} = x"${ac_package}" | 
|---|
|  | 721 | then | 
|---|
|  | 722 | ac_with_check_opt=yes | 
|---|
|  | 723 | fi | 
|---|
|  | 724 | done | 
|---|
|  | 725 | if test x${ac_with_check_opt} = xno | 
|---|
|  | 726 | then | 
|---|
|  | 727 | AC_MSG_ERROR([unrecognized option: $ac_option | 
|---|
|  | 728 | Try `$[0] --help' for more information.]) | 
|---|
|  | 729 | fi | 
|---|
|  | 730 | eval "with_$ac_package=no" ;; | 
|---|
|  | 731 |  | 
|---|
|  | 732 |  | 
|---|
|  | 733 | -*) AC_MSG_ERROR([unrecognized option: $ac_option | 
|---|
|  | 734 | Try `$[0] --help' for more information.]) | 
|---|
|  | 735 | ;; | 
|---|
|  | 736 |  | 
|---|
|  | 737 | *=*) | 
|---|
|  | 738 | ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='` | 
|---|
|  | 739 | # Reject names that are not valid shell variable names. | 
|---|
|  | 740 | expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 741 | AC_MSG_ERROR([invalid variable name: $ac_envvar]) | 
|---|
|  | 742 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | 
|---|
|  | 743 | eval "$ac_envvar='$ac_optarg'" | 
|---|
|  | 744 | export $ac_envvar ;; | 
|---|
|  | 745 |  | 
|---|
|  | 746 | *) | 
|---|
|  | 747 | # FIXME: should be removed in autoconf 3.0. | 
|---|
|  | 748 | AC_MSG_WARN([you should use --build, --host, --target]) | 
|---|
|  | 749 | expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null && | 
|---|
|  | 750 | AC_MSG_WARN([invalid host type: $ac_option]) | 
|---|
|  | 751 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | 
|---|
|  | 752 | ;; | 
|---|
|  | 753 |  | 
|---|
|  | 754 |  | 
|---|
|  | 755 | esac | 
|---|
|  | 756 | done | 
|---|
|  | 757 |  | 
|---|
|  | 758 | if test -n "$ac_prev"; then | 
|---|
|  | 759 | AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) | 
|---|
|  | 760 | fi | 
|---|
|  | 761 |  | 
|---|
|  | 762 | # Be sure to have absolute paths. | 
|---|
|  | 763 | for ac_var in prefix exec_prefix | 
|---|
|  | 764 | do | 
|---|
|  | 765 | eval ac_val=$`echo $ac_var` | 
|---|
|  | 766 | case $ac_val in | 
|---|
|  | 767 | [[\\/$]]* | ?:[[\\/]]* | NONE | '' | OPT | USR ) ;; | 
|---|
|  | 768 | *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);; | 
|---|
|  | 769 | esac | 
|---|
|  | 770 | done | 
|---|
|  | 771 |  | 
|---|
|  | 772 | # Be sure to have absolute paths. | 
|---|
|  | 773 | for ac_var in sbindir sysconfdir localstatedir mandir | 
|---|
|  | 774 | do | 
|---|
|  | 775 | eval ac_val=$`echo $ac_var` | 
|---|
|  | 776 | case $ac_val in | 
|---|
|  | 777 | [[\\/$]]* | ?:[[\\/]]* ) ;; | 
|---|
|  | 778 | *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);; | 
|---|
|  | 779 | esac | 
|---|
|  | 780 | done | 
|---|
|  | 781 |  | 
|---|
|  | 782 | # There might be people who depend on the old broken behavior: `$host' | 
|---|
|  | 783 | # used to hold the argument of --host etc. | 
|---|
|  | 784 | # FIXME: To remove some day. | 
|---|
|  | 785 | build=$build_alias | 
|---|
|  | 786 | host=$host_alias | 
|---|
|  | 787 | target=$target_alias | 
|---|
|  | 788 |  | 
|---|
|  | 789 | # FIXME: To remove some day. | 
|---|
|  | 790 | if test "x$host_alias" != x; then | 
|---|
|  | 791 | if test "x$build_alias" = x; then | 
|---|
|  | 792 | cross_compiling=maybe | 
|---|
|  | 793 | AC_MSG_WARN([If you wanted to set the --build type, don't use --host. | 
|---|
|  | 794 | If a cross compiler is detected then cross compile mode will be used.]) | 
|---|
|  | 795 | elif test "x$build_alias" != "x$host_alias"; then | 
|---|
|  | 796 | cross_compiling=yes | 
|---|
|  | 797 | fi | 
|---|
|  | 798 | fi | 
|---|
|  | 799 |  | 
|---|
|  | 800 | ac_tool_prefix= | 
|---|
|  | 801 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | 
|---|
|  | 802 |  | 
|---|
|  | 803 | test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null | 
|---|
|  | 804 |  | 
|---|
|  | 805 | m4_divert_pop([PARSE_ARGS])dnl | 
|---|
|  | 806 | ])# SH_INIT_PARSE_ARGS | 
|---|
|  | 807 |  | 
|---|
|  | 808 | m4_define([SH_INIT_HELP], | 
|---|
|  | 809 | [m4_divert_push([HELP_BEGIN])dnl | 
|---|
|  | 810 |  | 
|---|
|  | 811 | # | 
|---|
|  | 812 | # Report the --help message. | 
|---|
|  | 813 | # | 
|---|
|  | 814 | if test "$ac_init_help" = "long"; then | 
|---|
|  | 815 | # Omit some internal or obsolete options to make the list less imposing. | 
|---|
|  | 816 | # This message is too long to be a string in the A/UX 3.1 sh. | 
|---|
|  | 817 | cat <<_ACEOF | 
|---|
|  | 818 | \`configure' configures m4_ifset([AC_PACKAGE_STRING], | 
|---|
|  | 819 | [AC_PACKAGE_STRING], | 
|---|
|  | 820 | [this package]) to adapt to many kinds of systems. | 
|---|
|  | 821 |  | 
|---|
|  | 822 | Usage: $[0] [[OPTION]]... [[VAR=VALUE]]... | 
|---|
|  | 823 |  | 
|---|
|  | 824 | [To assign environment variables (e.g., CC, CFLAGS...), specify them as | 
|---|
|  | 825 | VAR=VALUE.  See below for descriptions of some of the useful variables. | 
|---|
|  | 826 |  | 
|---|
|  | 827 | Defaults for the options are specified in brackets. | 
|---|
|  | 828 |  | 
|---|
|  | 829 | Configuration: | 
|---|
|  | 830 | -h, --help              display this help and exit | 
|---|
|  | 831 | --help=short        display options specific to this package | 
|---|
|  | 832 | --help=recursive    display the short help of all the included packages | 
|---|
|  | 833 | -V, --version           display version information and exit | 
|---|
|  | 834 | -q, --quiet, --silent   do not print \`checking...' messages | 
|---|
|  | 835 | --cache-file=FILE   cache test results in FILE [disabled] | 
|---|
|  | 836 | -C, --config-cache      alias for \`--cache-file=config.cache' | 
|---|
|  | 837 | -n, --no-create         do not create output files | 
|---|
|  | 838 | --srcdir=DIR        find the sources in DIR [configure dir or \`..'] | 
|---|
|  | 839 |  | 
|---|
|  | 840 | _ACEOF | 
|---|
|  | 841 |  | 
|---|
|  | 842 | cat <<_ACEOF | 
|---|
|  | 843 | Installation directories: | 
|---|
|  | 844 | --prefix=PREFIX         install architecture-independent files in PREFIX | 
|---|
|  | 845 | [$ac_default_prefix] | 
|---|
|  | 846 | --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX | 
|---|
|  | 847 | [PREFIX] | 
|---|
|  | 848 |  | 
|---|
|  | 849 | By default, \`make install' will install binaries in \`/usr/local/sbin', | 
|---|
|  | 850 | the config file in \`/etc', manpage in \`/usr/local/share/man', and state | 
|---|
|  | 851 | data in \`/var/lib/INSTALL_NAME' (FSH layout).  You can specify other | 
|---|
|  | 852 | FSH compliant layouts with \`--prefix=OPT' or \`--prefix=USR', or you | 
|---|
|  | 853 | can specify a directory with \`--prefix=DIR' to install in \`DIR/sbin', | 
|---|
|  | 854 | \`DIR/etc', etc. | 
|---|
|  | 855 |  | 
|---|
|  | 856 | For better control, use the options below. | 
|---|
|  | 857 |  | 
|---|
|  | 858 | Fine tuning of the installation directories: | 
|---|
|  | 859 | --sbindir=DIR          system admin executables [EPREFIX/sbin] | 
|---|
|  | 860 | --sysconfdir=DIR       read-only single-machine data [PREFIX/etc] | 
|---|
|  | 861 | --localstatedir=DIR    modifiable single-machine data [PREFIX/var] | 
|---|
|  | 862 | --mandir=DIR           man documentation [PREFIX/man] | 
|---|
|  | 863 |  | 
|---|
|  | 864 | For even finer tuning, paths can be specified for individual files (see below) | 
|---|
|  | 865 |  | 
|---|
|  | 866 | _ACEOF | 
|---|
|  | 867 |  | 
|---|
|  | 868 | cat <<\_ACEOF] | 
|---|
|  | 869 | m4_divert_pop([HELP_BEGIN])dnl | 
|---|
|  | 870 | dnl The order of the diversions here is | 
|---|
|  | 871 | dnl - HELP_BEGIN | 
|---|
|  | 872 | dnl   which may be prolongated by extra generic options such as with X or | 
|---|
|  | 873 | dnl   AC_ARG_PROGRAM.  Displayed only in long --help. | 
|---|
|  | 874 | dnl | 
|---|
|  | 875 | dnl - HELP_CANON | 
|---|
|  | 876 | dnl   Support for cross compilation (--build, --host and --target). | 
|---|
|  | 877 | dnl   Display only in long --help. | 
|---|
|  | 878 | dnl | 
|---|
|  | 879 | dnl - HELP_ENABLE | 
|---|
|  | 880 | dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section, | 
|---|
|  | 881 | dnl   then implements the header of the non generic options. | 
|---|
|  | 882 | dnl | 
|---|
|  | 883 | dnl - HELP_WITH | 
|---|
|  | 884 | dnl | 
|---|
|  | 885 | dnl - HELP_VAR | 
|---|
|  | 886 | dnl | 
|---|
|  | 887 | dnl - HELP_VAR_END | 
|---|
|  | 888 | dnl | 
|---|
|  | 889 | dnl - HELP_END | 
|---|
|  | 890 | dnl   initialized below, in which we dump the trailer (handling of the | 
|---|
|  | 891 | dnl   recursion for instance). | 
|---|
|  | 892 | m4_divert_push([HELP_ENABLE])dnl | 
|---|
|  | 893 | _ACEOF | 
|---|
|  | 894 | fi | 
|---|
|  | 895 |  | 
|---|
|  | 896 | if test -n "$ac_init_help"; then | 
|---|
|  | 897 | m4_ifset([AC_PACKAGE_STRING], | 
|---|
|  | 898 | [  case $ac_init_help in | 
|---|
|  | 899 | short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";; | 
|---|
|  | 900 | esac]) | 
|---|
|  | 901 | cat <<\_ACEOF | 
|---|
|  | 902 | m4_divert_pop([HELP_ENABLE])dnl | 
|---|
|  | 903 | m4_divert_push([HELP_END])dnl | 
|---|
|  | 904 | m4_ifset([AC_PACKAGE_BUGREPORT], [ | 
|---|
|  | 905 | Report bugs to <AC_PACKAGE_BUGREPORT>.]) | 
|---|
|  | 906 | _ACEOF | 
|---|
|  | 907 | fi | 
|---|
|  | 908 |  | 
|---|
|  | 909 | if test "$ac_init_help" = "recursive"; then | 
|---|
|  | 910 | # If there are subdirs, report their specific --help. | 
|---|
|  | 911 | ac_popdir=`pwd` | 
|---|
|  | 912 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | 
|---|
|  | 913 | test -d $ac_dir || continue | 
|---|
|  | 914 | _AC_SRCPATHS(["$ac_dir"]) | 
|---|
|  | 915 | cd $ac_dir | 
|---|
|  | 916 | # Check for guested configure; otherwise get Cygnus style configure. | 
|---|
|  | 917 | if test -f $ac_srcdir/configure.gnu; then | 
|---|
|  | 918 | echo | 
|---|
|  | 919 | $SHELL $ac_srcdir/configure.gnu  --help=recursive | 
|---|
|  | 920 | elif test -f $ac_srcdir/configure; then | 
|---|
|  | 921 | echo | 
|---|
|  | 922 | $SHELL $ac_srcdir/configure  --help=recursive | 
|---|
|  | 923 | elif test -f $ac_srcdir/configure.ac || | 
|---|
|  | 924 | test -f $ac_srcdir/configure.in; then | 
|---|
|  | 925 | echo | 
|---|
|  | 926 | $ac_configure --help | 
|---|
|  | 927 | else | 
|---|
|  | 928 | AC_MSG_WARN([no configuration information is in $ac_dir]) | 
|---|
|  | 929 | fi | 
|---|
|  | 930 | cd $ac_popdir | 
|---|
|  | 931 | done | 
|---|
|  | 932 | fi | 
|---|
|  | 933 |  | 
|---|
|  | 934 | test -n "$ac_init_help" && exit 0 | 
|---|
|  | 935 | m4_divert_pop([HELP_END])dnl | 
|---|
|  | 936 | ])# SH_INIT_HELP | 
|---|
|  | 937 |  | 
|---|
|  | 938 |  | 
|---|
|  | 939 |  | 
|---|
|  | 940 |  | 
|---|
|  | 941 |  | 
|---|
|  | 942 |  | 
|---|
|  | 943 |  | 
|---|
|  | 944 |  | 
|---|
|  | 945 | # Check whether sa_sigaction works. | 
|---|
|  | 946 | # Rainer Wichmann <support@la-samhna.de>, 2003. | 
|---|
|  | 947 | # | 
|---|
|  | 948 | # This file can be copied and used freely without restrictions.  It can | 
|---|
|  | 949 | # be used in projects which are not available under the GNU Public License. | 
|---|
|  | 950 |  | 
|---|
|  | 951 | # serial 1 | 
|---|
|  | 952 |  | 
|---|
|  | 953 | AC_DEFUN([AM_SA_SIGACTION_WORKS], | 
|---|
|  | 954 | [ | 
|---|
|  | 955 | am_cv_val_SA_SIGACTION=no | 
|---|
|  | 956 | AC_CHECK_HEADER(signal.h, | 
|---|
|  | 957 | [ | 
|---|
|  | 958 | AM_SI_USER | 
|---|
|  | 959 | AM_SA_SIGINFO | 
|---|
|  | 960 | if test $am_cv_val_SI_USER = yes && test $am_cv_val_SA_SIGINFO = yes | 
|---|
|  | 961 | then | 
|---|
|  | 962 | AC_TRY_RUN([ | 
|---|
|  | 963 | #include <signal.h> | 
|---|
|  | 964 | #include <setjmp.h> | 
|---|
|  | 965 | #include <stdio.h> | 
|---|
|  | 966 | #include <stdlib.h> | 
|---|
|  | 967 |  | 
|---|
|  | 968 | volatile int xnum  = 0; | 
|---|
|  | 969 | volatile int xcode = 0; | 
|---|
|  | 970 | jmp_buf      Buf; | 
|---|
|  | 971 | int          xsig  = SIGSEGV; | 
|---|
|  | 972 |  | 
|---|
|  | 973 | void sighandler (int xsignam, siginfo_t * xsiginfo, void * xsigadd) | 
|---|
|  | 974 | { | 
|---|
|  | 975 | static sigset_t x; | 
|---|
|  | 976 |  | 
|---|
|  | 977 | if (xsiginfo == NULL) | 
|---|
|  | 978 | exit(__LINE__); | 
|---|
|  | 979 | if (xsiginfo->si_signo != xsignam) | 
|---|
|  | 980 | exit(__LINE__); | 
|---|
|  | 981 | ++xnum; | 
|---|
|  | 982 | xcode   = xsiginfo->si_code; | 
|---|
|  | 983 | sigemptyset (&x); | 
|---|
|  | 984 | sigprocmask(SIG_SETMASK, &x, NULL); | 
|---|
|  | 985 | longjmp ( Buf, 1); | 
|---|
|  | 986 | } | 
|---|
|  | 987 |  | 
|---|
|  | 988 | int main () | 
|---|
|  | 989 | { | 
|---|
|  | 990 | struct sigaction newact; | 
|---|
|  | 991 |  | 
|---|
|  | 992 | newact.sa_sigaction = sighandler; | 
|---|
|  | 993 | sigemptyset (&newact.sa_mask); | 
|---|
|  | 994 | newact.sa_flags = SA_SIGINFO; | 
|---|
|  | 995 | if (0 != sigaction (xsig, &newact, NULL)) | 
|---|
|  | 996 | exit (__LINE__); | 
|---|
|  | 997 | if(setjmp ( Buf)) { | 
|---|
|  | 998 | if (xnum > 1) | 
|---|
|  | 999 | goto Third; | 
|---|
|  | 1000 | goto Second; | 
|---|
|  | 1001 | } | 
|---|
|  | 1002 | memcpy((void *) 0x0, "test", 5); | 
|---|
|  | 1003 | Second: | 
|---|
|  | 1004 | if (xcode == SI_USER) | 
|---|
|  | 1005 | exit (__LINE__); | 
|---|
|  | 1006 | raise(xsig); | 
|---|
|  | 1007 | Third: | 
|---|
|  | 1008 | if (xcode != SI_USER) | 
|---|
|  | 1009 | exit (__LINE__); | 
|---|
|  | 1010 | if (xnum != 2) | 
|---|
|  | 1011 | exit (__LINE__); | 
|---|
|  | 1012 | return (0); | 
|---|
|  | 1013 | }], am_cv_val_SA_SIGACTION=yes, am_cv_val_SA_SIGACTION=no, am_cv_val_SA_SIGACTION=no) | 
|---|
|  | 1014 | fi | 
|---|
|  | 1015 | ]) | 
|---|
|  | 1016 | AC_MSG_CHECKING([whether sa_sigaction is supported]) | 
|---|
|  | 1017 | if test $am_cv_val_SA_SIGACTION = yes | 
|---|
|  | 1018 | then | 
|---|
|  | 1019 | AC_MSG_RESULT(yes) | 
|---|
|  | 1020 | AC_DEFINE([SA_SIGACTION_WORKS], 1, [Define if sa_sigaction works]) | 
|---|
|  | 1021 | else | 
|---|
|  | 1022 | AC_MSG_RESULT(no) | 
|---|
|  | 1023 | fi | 
|---|
|  | 1024 | ]) | 
|---|
|  | 1025 |  | 
|---|
|  | 1026 | # Check whether SI_USER is available in <signal.h>. | 
|---|
|  | 1027 | # Rainer Wichmann <support@la-samhna.de>, 2003. | 
|---|
|  | 1028 | # | 
|---|
|  | 1029 | # This file can be copied and used freely without restrictions.  It can | 
|---|
|  | 1030 | # be used in projects which are not available under the GNU Public License. | 
|---|
|  | 1031 |  | 
|---|
|  | 1032 | # serial 1 | 
|---|
|  | 1033 |  | 
|---|
|  | 1034 |  | 
|---|
|  | 1035 | AC_DEFUN([AM_SI_USER], | 
|---|
|  | 1036 | [if test $ac_cv_header_signal_h = yes; then | 
|---|
|  | 1037 | AC_CACHE_CHECK([for SI_USER in signal.h], am_cv_val_SI_USER, | 
|---|
|  | 1038 | [AC_TRY_LINK([#include <signal.h>], [return SI_USER], | 
|---|
|  | 1039 | am_cv_val_SI_USER=yes, am_cv_val_SI_USER=no)]) | 
|---|
|  | 1040 | if test $am_cv_val_SI_USER = yes; then | 
|---|
|  | 1041 | AC_DEFINE([HAVE_SI_USER], 1, [Define if you have SI_USER]) | 
|---|
|  | 1042 | fi | 
|---|
|  | 1043 | fi]) | 
|---|
|  | 1044 |  | 
|---|
|  | 1045 | # Check whether SA_SIGINFO is available in <signal.h>. | 
|---|
|  | 1046 | # Rainer Wichmann <support@la-samhna.de>, 2003. | 
|---|
|  | 1047 | # | 
|---|
|  | 1048 | # This file can be copied and used freely without restrictions.  It can | 
|---|
|  | 1049 | # be used in projects which are not available under the GNU Public License. | 
|---|
|  | 1050 |  | 
|---|
|  | 1051 | # serial 1 | 
|---|
|  | 1052 |  | 
|---|
|  | 1053 |  | 
|---|
|  | 1054 | AC_DEFUN([AM_SA_SIGINFO], | 
|---|
|  | 1055 | [if test $ac_cv_header_signal_h = yes; then | 
|---|
|  | 1056 | AC_CACHE_CHECK([for SA_SIGINFO in signal.h], am_cv_val_SA_SIGINFO, | 
|---|
|  | 1057 | [AC_TRY_LINK([#include <signal.h>], [return SA_SIGINFO], | 
|---|
|  | 1058 | am_cv_val_SA_SIGINFO=yes, am_cv_val_SA_SIGINFO=no)]) | 
|---|
|  | 1059 | if test $am_cv_val_SA_SIGINFO = yes; then | 
|---|
|  | 1060 | AC_DEFINE([HAVE_SA_SIGINFO], 1, [Define if you have SA_SIGINFO]) | 
|---|
|  | 1061 | fi | 
|---|
|  | 1062 | fi]) | 
|---|
|  | 1063 |  | 
|---|
|  | 1064 | dnl | 
|---|
|  | 1065 | dnl Useful macros for autoconf to check for ssp-patched gcc | 
|---|
|  | 1066 | dnl 1.0 - September 2003 - Tiago Sousa <mirage@kaotik.org> | 
|---|
| [120] | 1067 | dnl 1.1 - August 2006 - Ted Percival <ted@midg3t.net> | 
|---|
|  | 1068 | dnl     * Stricter language checking (C or C++) | 
|---|
|  | 1069 | dnl     * Adds GCC_STACK_PROTECT_LIB to add -lssp to LDFLAGS as necessary | 
|---|
|  | 1070 | dnl     * Caches all results | 
|---|
|  | 1071 | dnl     * Uses macros to ensure correct ouput in quiet/silent mode | 
|---|
|  | 1072 | dnl 1.2 - April 2007 - Ted Percival <ted@midg3t.net> | 
|---|
|  | 1073 | dnl     * Added GCC_STACK_PROTECTOR macro for simpler (one-line) invocation | 
|---|
|  | 1074 | dnl     * GCC_STACK_PROTECT_LIB now adds -lssp to LIBS rather than LDFLAGS | 
|---|
| [1] | 1075 | dnl | 
|---|
|  | 1076 | dnl About ssp: | 
|---|
|  | 1077 | dnl GCC extension for protecting applications from stack-smashing attacks | 
|---|
|  | 1078 | dnl http://www.research.ibm.com/trl/projects/security/ssp/ | 
|---|
|  | 1079 | dnl | 
|---|
|  | 1080 | dnl Usage: | 
|---|
| [120] | 1081 | dnl Most people will simply call GCC_STACK_PROTECTOR. | 
|---|
|  | 1082 | dnl If you only use one of C or C++, you can save time by only calling the | 
|---|
|  | 1083 | dnl macro appropriate for that language. In that case you should also call | 
|---|
|  | 1084 | dnl GCC_STACK_PROTECT_LIB first. | 
|---|
| [1] | 1085 | dnl | 
|---|
| [120] | 1086 | dnl GCC_STACK_PROTECTOR | 
|---|
|  | 1087 | dnl Tries to turn on stack protection for C and C++ by calling the following | 
|---|
|  | 1088 | dnl three macros with the right languages. | 
|---|
|  | 1089 | dnl | 
|---|
| [1] | 1090 | dnl GCC_STACK_PROTECT_CC | 
|---|
|  | 1091 | dnl checks -fstack-protector with the C compiler, if it exists then updates | 
|---|
|  | 1092 | dnl CFLAGS and defines ENABLE_SSP_CC | 
|---|
|  | 1093 | dnl | 
|---|
| [120] | 1094 | dnl GCC_STACK_PROTECT_CXX | 
|---|
|  | 1095 | dnl checks -fstack-protector with the C++ compiler, if it exists then updates | 
|---|
|  | 1096 | dnl CXXFLAGS and defines ENABLE_SSP_CXX | 
|---|
|  | 1097 | dnl | 
|---|
|  | 1098 | dnl GCC_STACK_PROTECT_LIB | 
|---|
|  | 1099 | dnl adds -lssp to LIBS if it is available | 
|---|
|  | 1100 | dnl ssp is usually provided as part of libc, but was previously a separate lib | 
|---|
|  | 1101 | dnl It does not hurt to add -lssp even if libc provides SSP - in that case | 
|---|
|  | 1102 | dnl libssp will simply be ignored. | 
|---|
|  | 1103 | dnl | 
|---|
|  | 1104 |  | 
|---|
|  | 1105 | AC_DEFUN([GCC_STACK_PROTECT_LIB],[ | 
|---|
|  | 1106 | AC_CACHE_CHECK([whether libssp exists], ssp_cv_lib, | 
|---|
|  | 1107 | [ssp_old_libs="$LIBS" | 
|---|
|  | 1108 | LIBS="$LIBS -lssp" | 
|---|
|  | 1109 | AC_TRY_LINK(,, ssp_cv_lib=yes, ssp_cv_lib=no) | 
|---|
|  | 1110 | LIBS="$ssp_old_libs" | 
|---|
|  | 1111 | ]) | 
|---|
|  | 1112 | if test $ssp_cv_lib = yes; then | 
|---|
|  | 1113 | LIBS="$LIBS -lssp" | 
|---|
|  | 1114 | fi | 
|---|
|  | 1115 | ]) | 
|---|
|  | 1116 |  | 
|---|
| [1] | 1117 | AC_DEFUN([GCC_STACK_PROTECT_CC],[ | 
|---|
| [120] | 1118 | AC_LANG_ASSERT(C) | 
|---|
|  | 1119 | if test "X$CC" != "X"; then | 
|---|
|  | 1120 | AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector], | 
|---|
|  | 1121 | ssp_cv_cc, | 
|---|
|  | 1122 | [ssp_old_cflags="$CFLAGS" | 
|---|
|  | 1123 | CFLAGS="$CFLAGS -fstack-protector" | 
|---|
|  | 1124 | AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no) | 
|---|
|  | 1125 | CFLAGS="$ssp_old_cflags" | 
|---|
|  | 1126 | ]) | 
|---|
|  | 1127 | if test $ssp_cv_cc = yes; then | 
|---|
|  | 1128 | CFLAGS="$CFLAGS -fstack-protector" | 
|---|
| [1] | 1129 | AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) | 
|---|
|  | 1130 | fi | 
|---|
|  | 1131 | fi | 
|---|
|  | 1132 | ]) | 
|---|
|  | 1133 |  | 
|---|
| [120] | 1134 | AC_DEFUN([GCC_STACK_PROTECT_CXX],[ | 
|---|
|  | 1135 | AC_LANG_ASSERT(C++) | 
|---|
|  | 1136 | if test "X$CXX" != "X"; then | 
|---|
|  | 1137 | AC_CACHE_CHECK([whether ${CXX} accepts -fstack-protector], | 
|---|
|  | 1138 | ssp_cv_cxx, | 
|---|
|  | 1139 | [ssp_old_cxxflags="$CXXFLAGS" | 
|---|
|  | 1140 | CXXFLAGS="$CXXFLAGS -fstack-protector" | 
|---|
|  | 1141 | AC_TRY_COMPILE(,, ssp_cv_cxx=yes, ssp_cv_cxx=no) | 
|---|
|  | 1142 | CXXFLAGS="$ssp_old_cxxflags" | 
|---|
|  | 1143 | ]) | 
|---|
|  | 1144 | if test $ssp_cv_cxx = yes; then | 
|---|
|  | 1145 | CXXFLAGS="$CXXFLAGS -fstack-protector" | 
|---|
|  | 1146 | AC_DEFINE([ENABLE_SSP_CXX], 1, [Define if SSP C++ support is enabled.]) | 
|---|
|  | 1147 | fi | 
|---|
|  | 1148 | fi | 
|---|
|  | 1149 | ]) | 
|---|
|  | 1150 |  | 
|---|
|  | 1151 | AC_DEFUN([GCC_STACK_PROTECTOR],[ | 
|---|
|  | 1152 | GCC_STACK_PROTECT_LIB | 
|---|
|  | 1153 |  | 
|---|
|  | 1154 | AC_LANG_PUSH([C]) | 
|---|
|  | 1155 | GCC_STACK_PROTECT_CC | 
|---|
|  | 1156 | AC_LANG_POP([C]) | 
|---|
|  | 1157 |  | 
|---|
|  | 1158 | AC_LANG_PUSH([C++]) | 
|---|
|  | 1159 | GCC_STACK_PROTECT_CXX | 
|---|
|  | 1160 | AC_LANG_POP([C++]) | 
|---|
|  | 1161 | ]) | 
|---|
|  | 1162 |  | 
|---|
|  | 1163 |  | 
|---|
|  | 1164 |  | 
|---|
| [1] | 1165 | AC_DEFUN([SAMHAIN_POSIX],[ | 
|---|
|  | 1166 | AC_MSG_CHECKING([whether _POSIX_SOURCE is necessary]) | 
|---|
|  | 1167 | AC_TRY_COMPILE([#include <stdio.h> | 
|---|
|  | 1168 | void fileno(int);int fdopen(int, char *); ],, | 
|---|
|  | 1169 | [ | 
|---|
|  | 1170 | AC_MSG_RESULT(yes) | 
|---|
|  | 1171 | AC_DEFINE([_POSIX_SOURCE],1,[Define if POSIX functions are required]) | 
|---|
|  | 1172 | ], | 
|---|
|  | 1173 | [AC_MSG_RESULT(no)]) | 
|---|
|  | 1174 | ])dnl | 
|---|
|  | 1175 |  | 
|---|
| [18] | 1176 | dnl checks for a known 64 bit programming environment | 
|---|
|  | 1177 | dnl AC_RUN_IFELSE(PROGRAM, | 
|---|
|  | 1178 | dnl               [ACTION-IF-TRUE], [ACTION-IF-FALSE], | 
|---|
|  | 1179 | dnl               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) | 
|---|
|  | 1180 | dnl | 
|---|
|  | 1181 | AC_DEFUN([SAMHAIN_PRG_ENV],[ | 
|---|
|  | 1182 | AC_MSG_CHECKING([for a known 64 bit programming environment]) | 
|---|
|  | 1183 | # Compile and run a program that determines the programming environment | 
|---|
|  | 1184 | AC_RUN_IFELSE([ | 
|---|
|  | 1185 | AC_LANG_SOURCE([[ | 
|---|
|  | 1186 | #include <stdio.h> | 
|---|
|  | 1187 | int main(int argc,char **argv) | 
|---|
|  | 1188 | { | 
|---|
|  | 1189 | if (argc > 1) { | 
|---|
|  | 1190 | #if defined(__arch64__) | 
|---|
|  | 1191 | printf("__arch64__\n"); | 
|---|
|  | 1192 | #elif defined(__ia64__) | 
|---|
|  | 1193 | printf("__ia64__\n"); | 
|---|
|  | 1194 | #elif defined(__x86_64__) | 
|---|
|  | 1195 | printf("__x86_64__\n"); | 
|---|
|  | 1196 | #elif defined(__LP64__) | 
|---|
|  | 1197 | printf("__LP64__\n"); | 
|---|
|  | 1198 | #elif defined(__64BIT__) | 
|---|
|  | 1199 | printf("__64BIT__\n"); | 
|---|
|  | 1200 | #elif defined(_LP64) | 
|---|
|  | 1201 | printf("_LP64\n"); | 
|---|
|  | 1202 | #elif defined(_M_IA64) | 
|---|
|  | 1203 | printf("_M_IA64\n"); | 
|---|
|  | 1204 | #elif defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64) | 
|---|
|  | 1205 | printf("_MIPS_64\n"); | 
|---|
|  | 1206 | #else | 
|---|
|  | 1207 | choke me | 
|---|
|  | 1208 | #endif | 
|---|
|  | 1209 | } | 
|---|
|  | 1210 | return 0; | 
|---|
|  | 1211 | } | 
|---|
|  | 1212 | ]]) | 
|---|
|  | 1213 | ],[ | 
|---|
|  | 1214 | # Program compiled and ran, so get version by adding argument. | 
|---|
|  | 1215 | samhain_prg_ENV=`./conftest$ac_exeext x` | 
|---|
|  | 1216 | samhain_64=yes | 
|---|
|  | 1217 | AC_MSG_RESULT([$samhain_prg_ENV]) | 
|---|
|  | 1218 | ],[ | 
|---|
|  | 1219 | AC_MSG_RESULT([none]) | 
|---|
|  | 1220 | ],[ | 
|---|
|  | 1221 | AC_MSG_RESULT([none]) | 
|---|
|  | 1222 | ]) | 
|---|
|  | 1223 | ])dnl | 
|---|
|  | 1224 |  | 
|---|
|  | 1225 | AC_DEFUN([SAMHAIN_X86_64],[ | 
|---|
|  | 1226 | AC_MSG_CHECKING([for x86_64]) | 
|---|
|  | 1227 | AC_TRY_RUN([ | 
|---|
|  | 1228 | int main() { | 
|---|
|  | 1229 | __asm__ volatile ( | 
|---|
|  | 1230 | "movq %rax, %rax" | 
|---|
|  | 1231 | ); | 
|---|
|  | 1232 | return 0; | 
|---|
|  | 1233 | } | 
|---|
|  | 1234 | ], | 
|---|
|  | 1235 | [ | 
|---|
|  | 1236 | AC_MSG_RESULT(yes) | 
|---|
|  | 1237 | samhain_64=yes | 
|---|
|  | 1238 | tiger_src=sh_tiger1_64.c | 
|---|
|  | 1239 | AC_DEFINE([TIGER_OPT_ASM],1,[Define to use tiger x86_64 optimized assembly]) | 
|---|
|  | 1240 | ], | 
|---|
|  | 1241 | [ | 
|---|
|  | 1242 | AC_MSG_RESULT([no]) | 
|---|
|  | 1243 | ],[ | 
|---|
|  | 1244 | AC_MSG_RESULT([no]) | 
|---|
|  | 1245 | ]) | 
|---|
|  | 1246 | ])dnl | 
|---|
|  | 1247 |  | 
|---|
|  | 1248 |  | 
|---|
|  | 1249 | AC_DEFUN([SAMHAIN_64],[ | 
|---|
|  | 1250 | samhain_64=no | 
|---|
|  | 1251 | tiger_src=sh_tiger1.c | 
|---|
|  | 1252 | # | 
|---|
|  | 1253 | # if sizeof(unsigned long) = 4, try compiler macros for 64bit | 
|---|
|  | 1254 | # | 
|---|
|  | 1255 | if test "x$ac_cv_sizeof_unsigned_long" = x4; then | 
|---|
|  | 1256 | if test "x$ac_cv_sizeof_unsigned_long_long" = x8; then | 
|---|
|  | 1257 | SAMHAIN_PRG_ENV | 
|---|
|  | 1258 | if test "x$samhain_64" = xyes; then | 
|---|
|  | 1259 | tiger_src=sh_tiger1_64.c | 
|---|
|  | 1260 | fi | 
|---|
|  | 1261 | # | 
|---|
|  | 1262 | # if GCC and __i386__, use precompiled assembler | 
|---|
|  | 1263 | # | 
|---|
|  | 1264 | if test "x$GCC" = xyes; then | 
|---|
| [61] | 1265 | AC_MSG_CHECKING([for non-apple non-cygwin i386]) | 
|---|
| [18] | 1266 | samhain_i386=no | 
|---|
| [47] | 1267 | $CC -E -dM - < /dev/null | egrep '__i386__' >/dev/null 2>&1 | 
|---|
|  | 1268 | if test $? = 0; then | 
|---|
|  | 1269 | # apples gcc does not understand the assembly we provide | 
|---|
| [64] | 1270 | $CC -E -dM - < /dev/null | egrep '(__sun__|__APPLE__|__CYGWIN__)' >/dev/null 2>&1 || samhain_i386=yes | 
|---|
| [47] | 1271 | fi | 
|---|
| [18] | 1272 | if test "x$samhain_i386" = xyes; then | 
|---|
|  | 1273 | tiger_src=sh_tiger1.s | 
|---|
|  | 1274 | AC_DEFINE([TIGER_32_BIT_S],1,[Define to use tiger 32 bit i386 assembler]) | 
|---|
|  | 1275 | fi | 
|---|
|  | 1276 | AC_MSG_RESULT([$samhain_i386]) | 
|---|
|  | 1277 | fi | 
|---|
|  | 1278 | # | 
|---|
|  | 1279 | # | 
|---|
|  | 1280 | # | 
|---|
|  | 1281 | else | 
|---|
|  | 1282 | samhain_64=no | 
|---|
|  | 1283 | tiger_src=sh_tiger1.c | 
|---|
|  | 1284 | fi | 
|---|
|  | 1285 | else | 
|---|
|  | 1286 | # | 
|---|
|  | 1287 | # sizeof(unsigned long) = 8 | 
|---|
|  | 1288 | # | 
|---|
|  | 1289 | tiger_src=sh_tiger1_64.c | 
|---|
|  | 1290 | samhain_64=yes | 
|---|
|  | 1291 | # | 
|---|
|  | 1292 | # check for x86_64 (enables assembly optimizations) | 
|---|
|  | 1293 | # | 
|---|
|  | 1294 | if test "x$GCC" = xyes; then | 
|---|
|  | 1295 | SAMHAIN_X86_64 | 
|---|
|  | 1296 | fi | 
|---|
|  | 1297 | fi | 
|---|
|  | 1298 | if test "x$samhain_64" = xyes; then | 
|---|
|  | 1299 | AC_DEFINE([TIGER_64_BIT],1,[Define to use tiger 64 bit implementation]) | 
|---|
|  | 1300 | fi | 
|---|
|  | 1301 | AC_MSG_CHECKING([for 64 bit environment]) | 
|---|
|  | 1302 | AC_MSG_RESULT([$samhain_64]) | 
|---|
|  | 1303 | AC_MSG_CHECKING([for tiger source to use]) | 
|---|
|  | 1304 | AC_MSG_RESULT([$tiger_src]) | 
|---|
|  | 1305 | AC_SUBST(tiger_src) | 
|---|
|  | 1306 | ])dnl | 
|---|
|  | 1307 |  | 
|---|
| [68] | 1308 | AC_DEFUN([sh_CHECK_POSIX_ACL], | 
|---|
|  | 1309 | [ | 
|---|
|  | 1310 | AC_CHECK_HEADERS(sys/acl.h) | 
|---|
|  | 1311 | if test $ac_cv_header_sys_acl_h = yes; then | 
|---|
| [18] | 1312 |  | 
|---|
| [68] | 1313 | AC_CHECK_LIB([acl], [acl_get_file], sh_lacl=yes, sh_lacl=no) | 
|---|
|  | 1314 | if test x"$sh_lacl" = xyes; then | 
|---|
|  | 1315 | LIBACL=-lacl | 
|---|
|  | 1316 | else | 
|---|
|  | 1317 | LIBACL= | 
|---|
|  | 1318 | fi | 
|---|
|  | 1319 |  | 
|---|
|  | 1320 | OLDLIBS="$LIBS" | 
|---|
|  | 1321 | LIBS="$LIBS $LIBACL" | 
|---|
|  | 1322 | AC_CHECK_FUNCS([acl_free acl_get_file acl_get_fd], | 
|---|
|  | 1323 | [sh_facl=yes],[sh_facl=no]) | 
|---|
|  | 1324 | LIBS="$OLDLIBS" | 
|---|
|  | 1325 |  | 
|---|
|  | 1326 | if test x"$sh_facl" = xyes; then | 
|---|
|  | 1327 | AC_DEFINE(USE_ACL, 1, [Define if you want ACL support.]) | 
|---|
|  | 1328 | LIBS="$LIBS $LIBACL" | 
|---|
|  | 1329 | fi | 
|---|
|  | 1330 | fi | 
|---|
|  | 1331 | ]) | 
|---|
|  | 1332 |  | 
|---|
|  | 1333 | AC_DEFUN([sh_CHECK_XATTR], | 
|---|
|  | 1334 | [ | 
|---|
|  | 1335 | AC_CHECK_HEADERS(attr/xattr.h) | 
|---|
|  | 1336 | if test $ac_cv_header_attr_xattr_h = yes; then | 
|---|
|  | 1337 |  | 
|---|
|  | 1338 | AC_CHECK_LIB([attr], [getxattr], sh_lattr=yes, sh_lattr=no) | 
|---|
|  | 1339 | if test x"$sh_lattr" = xyes; then | 
|---|
|  | 1340 | LIBATTR=-lattr | 
|---|
|  | 1341 | else | 
|---|
|  | 1342 | LIBATTR= | 
|---|
|  | 1343 | fi | 
|---|
|  | 1344 |  | 
|---|
|  | 1345 | OLDLIBS="$LIBS" | 
|---|
|  | 1346 | LIBS="$LIBS $LIBATTR" | 
|---|
|  | 1347 | AC_CHECK_FUNCS([getxattr lgetxattr fgetxattr], | 
|---|
|  | 1348 | [sh_fattr=yes],[sh_fattr=no]) | 
|---|
|  | 1349 | LIBS="$OLDLIBS" | 
|---|
|  | 1350 |  | 
|---|
|  | 1351 | if test x"$sh_fattr" = xyes; then | 
|---|
|  | 1352 | AC_DEFINE(USE_XATTR, 1, [Define if you want extended attributes support.]) | 
|---|
|  | 1353 | LIBS="$LIBS $LIBATTR" | 
|---|
|  | 1354 | fi | 
|---|
|  | 1355 | fi | 
|---|
|  | 1356 | ]) | 
|---|
|  | 1357 |  | 
|---|
| [1] | 1358 | dnl Autoconf macros for libprelude | 
|---|
|  | 1359 | dnl $id$ | 
|---|
|  | 1360 |  | 
|---|
|  | 1361 | # Modified for LIBPRELUDE -- Yoann Vandoorselaere | 
|---|
|  | 1362 | # Modified for LIBGNUTLS -- nmav | 
|---|
|  | 1363 | # Configure paths for LIBGCRYPT | 
|---|
|  | 1364 | # Shamelessly stolen from the one of XDELTA by Owen Taylor | 
|---|
|  | 1365 | # Werner Koch   99-12-09 | 
|---|
|  | 1366 |  | 
|---|
|  | 1367 | dnl AM_PATH_LIBPRELUDE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | 
|---|
|  | 1368 | dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS, | 
|---|
|  | 1369 | dnl LIBPRELUDE_LDFLAGS, and LIBPRELUDE_LIBS | 
|---|
|  | 1370 | dnl | 
|---|
|  | 1371 | AC_DEFUN([AM_PATH_LIBPRELUDE], | 
|---|
|  | 1372 | [dnl | 
|---|
|  | 1373 | dnl Get the cflags and libraries from the libprelude-config script | 
|---|
|  | 1374 | dnl | 
|---|
|  | 1375 | dnl AC_ARG_WITH(libprelude-prefix, | 
|---|
|  | 1376 | dnl          [  --with-libprelude-prefix=PFX   Prefix where libprelude is installed (optional)], | 
|---|
|  | 1377 | dnl          libprelude_config_prefix="$withval", libprelude_config_prefix="") | 
|---|
|  | 1378 | dnl | 
|---|
|  | 1379 | dnl  if test x$libprelude_config_prefix != x ; then | 
|---|
|  | 1380 | dnl     if test x${LIBPRELUDE_CONFIG+set} != xset ; then | 
|---|
|  | 1381 | dnl        LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config | 
|---|
|  | 1382 | dnl     fi | 
|---|
|  | 1383 | dnl  fi | 
|---|
|  | 1384 | dnl | 
|---|
|  | 1385 | dnl  AC_PATH_PROG(LIBPRELUDE_CONFIG, libprelude-config, no) | 
|---|
|  | 1386 | min_libprelude_version=ifelse([$1], ,0.1.0,$1) | 
|---|
|  | 1387 | AC_MSG_CHECKING(for libprelude - version >= $min_libprelude_version) | 
|---|
|  | 1388 | no_libprelude="" | 
|---|
|  | 1389 | if test "$LIBPRELUDE_CONFIG" = "no" ; then | 
|---|
|  | 1390 | no_libprelude=yes | 
|---|
|  | 1391 | else | 
|---|
|  | 1392 | LIBPRELUDE_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --cflags` | 
|---|
|  | 1393 | LIBPRELUDE_PTHREAD_CFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --pthread-cflags` | 
|---|
|  | 1394 | LIBPRELUDE_LDFLAGS=`$LIBPRELUDE_CONFIG $libprelude_config_args --ldflags` | 
|---|
|  | 1395 | LIBPRELUDE_LIBS=`$LIBPRELUDE_CONFIG $libprelude_config_args --libs` | 
|---|
|  | 1396 | LIBPRELUDE_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --prefix` | 
|---|
|  | 1397 | LIBPRELUDE_CONFIG_PREFIX=`$LIBPRELUDE_CONFIG $libprelude_config_args --config-prefix` | 
|---|
|  | 1398 | libprelude_config_version=`$LIBPRELUDE_CONFIG $libprelude_config_args --version` | 
|---|
|  | 1399 |  | 
|---|
|  | 1400 |  | 
|---|
|  | 1401 | ac_save_CFLAGS="$CFLAGS" | 
|---|
|  | 1402 | ac_save_LDFLAGS="$LDFLAGS" | 
|---|
|  | 1403 | ac_save_LIBS="$LIBS" | 
|---|
|  | 1404 | CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" | 
|---|
|  | 1405 | LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" | 
|---|
|  | 1406 | LIBS="$LIBS $LIBPRELUDE_LIBS" | 
|---|
|  | 1407 | dnl | 
|---|
|  | 1408 | dnl Now check if the installed libprelude is sufficiently new. Also sanity | 
|---|
|  | 1409 | dnl checks the results of libprelude-config to some extent | 
|---|
|  | 1410 | dnl | 
|---|
|  | 1411 | rm -f conf.libpreludetest | 
|---|
|  | 1412 | AC_TRY_RUN([ | 
|---|
|  | 1413 | #include <stdio.h> | 
|---|
|  | 1414 | #include <stdlib.h> | 
|---|
|  | 1415 | #include <string.h> | 
|---|
|  | 1416 | #include <libprelude/prelude.h> | 
|---|
|  | 1417 |  | 
|---|
|  | 1418 | int | 
|---|
|  | 1419 | main () | 
|---|
|  | 1420 | { | 
|---|
|  | 1421 | system ("touch conf.libpreludetest"); | 
|---|
|  | 1422 |  | 
|---|
|  | 1423 | if( strcmp( prelude_check_version(NULL), "$libprelude_config_version" ) ) | 
|---|
|  | 1424 | { | 
|---|
|  | 1425 | printf("\n*** 'libprelude-config --version' returned %s, but LIBPRELUDE (%s)\n", | 
|---|
|  | 1426 | "$libprelude_config_version", prelude_check_version(NULL) ); | 
|---|
|  | 1427 | printf("*** was found! If libprelude-config was correct, then it is best\n"); | 
|---|
|  | 1428 | printf("*** to remove the old version of LIBPRELUDE. You may also be able to fix the error\n"); | 
|---|
|  | 1429 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | 
|---|
|  | 1430 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | 
|---|
|  | 1431 | printf("*** required on your system.\n"); | 
|---|
|  | 1432 | printf("*** If libprelude-config was wrong, set the environment variable LIBPRELUDE_CONFIG\n"); | 
|---|
|  | 1433 | printf("*** to point to the correct copy of libprelude-config, and remove the file config.cache\n"); | 
|---|
|  | 1434 | printf("*** before re-running configure\n"); | 
|---|
|  | 1435 | } | 
|---|
|  | 1436 | else if ( strcmp(prelude_check_version(NULL), LIBPRELUDE_VERSION ) ) | 
|---|
|  | 1437 | { | 
|---|
|  | 1438 | printf("\n*** LIBPRELUDE header file (version %s) does not match\n", LIBPRELUDE_VERSION); | 
|---|
|  | 1439 | printf("*** library (version %s)\n", prelude_check_version(NULL) ); | 
|---|
|  | 1440 | } | 
|---|
|  | 1441 | else | 
|---|
|  | 1442 | { | 
|---|
|  | 1443 | if ( prelude_check_version( "$min_libprelude_version" ) ) | 
|---|
|  | 1444 | { | 
|---|
|  | 1445 | return 0; | 
|---|
|  | 1446 | } | 
|---|
|  | 1447 | else | 
|---|
|  | 1448 | { | 
|---|
|  | 1449 | printf("no\n*** An old version of LIBPRELUDE (%s) was found.\n", | 
|---|
|  | 1450 | prelude_check_version(NULL) ); | 
|---|
|  | 1451 | printf("*** You need a version of LIBPRELUDE newer than %s. The latest version of\n", | 
|---|
|  | 1452 | "$min_libprelude_version" ); | 
|---|
|  | 1453 | printf("*** LIBPRELUDE is always available from http://www.prelude-ids.org/download/releases.\n"); | 
|---|
|  | 1454 | printf("*** \n"); | 
|---|
|  | 1455 | printf("*** If you have already installed a sufficiently new version, this error\n"); | 
|---|
|  | 1456 | printf("*** probably means that the wrong copy of the libprelude-config shell script is\n"); | 
|---|
|  | 1457 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); | 
|---|
|  | 1458 | printf("*** of LIBPRELUDE, but you can also set the LIBPRELUDE_CONFIG environment to point to the\n"); | 
|---|
|  | 1459 | printf("*** correct copy of libprelude-config. (In this case, you will have to\n"); | 
|---|
|  | 1460 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | 
|---|
|  | 1461 | printf("*** so that the correct libraries are found at run-time))\n"); | 
|---|
|  | 1462 | } | 
|---|
|  | 1463 | } | 
|---|
|  | 1464 | return 1; | 
|---|
|  | 1465 | } | 
|---|
|  | 1466 | ],, no_libprelude=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | 
|---|
|  | 1467 | CFLAGS="$ac_save_CFLAGS" | 
|---|
|  | 1468 | LIBS="$ac_save_LIBS" | 
|---|
|  | 1469 | LDFLAGS="$ac_save_LDFLAGS" | 
|---|
|  | 1470 | fi | 
|---|
|  | 1471 |  | 
|---|
|  | 1472 | if test "x$no_libprelude" = x ; then | 
|---|
|  | 1473 | AC_MSG_RESULT(yes) | 
|---|
|  | 1474 | ifelse([$2], , :, [$2]) | 
|---|
|  | 1475 | else | 
|---|
|  | 1476 | if test -f conf.libpreludetest ; then | 
|---|
|  | 1477 | : | 
|---|
|  | 1478 | else | 
|---|
|  | 1479 | AC_MSG_RESULT(no) | 
|---|
|  | 1480 | fi | 
|---|
|  | 1481 | if test "$LIBPRELUDE_CONFIG" = "no" ; then | 
|---|
|  | 1482 | echo "*** The libprelude-config script installed by LIBPRELUDE could not be found" | 
|---|
|  | 1483 | echo "*** If LIBPRELUDE was installed in PREFIX, make sure PREFIX/bin is in" | 
|---|
|  | 1484 | echo "*** your path, or set the LIBPRELUDE_CONFIG environment variable to the" | 
|---|
|  | 1485 | echo "*** full path to libprelude-config." | 
|---|
|  | 1486 | else | 
|---|
|  | 1487 | if test -f conf.libpreludetest ; then | 
|---|
|  | 1488 | : | 
|---|
|  | 1489 | else | 
|---|
|  | 1490 | echo "*** Could not run libprelude test program, checking why..." | 
|---|
|  | 1491 | CFLAGS="$CFLAGS $LIBPRELUDE_CFLAGS" | 
|---|
|  | 1492 | LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS" | 
|---|
|  | 1493 | LIBS="$LIBS $LIBPRELUDE_LIBS" | 
|---|
|  | 1494 | AC_TRY_LINK([ | 
|---|
|  | 1495 | #include <stdio.h> | 
|---|
|  | 1496 | #include <stdlib.h> | 
|---|
|  | 1497 | #include <string.h> | 
|---|
|  | 1498 | #include <libprelude/prelude.h> | 
|---|
|  | 1499 | ],      [ return !!prelude_check_version(NULL); ], | 
|---|
|  | 1500 | [ echo "*** The test program compiled, but did not run. This usually means" | 
|---|
|  | 1501 | echo "*** that the run-time linker is not finding LIBPRELUDE or finding the wrong" | 
|---|
|  | 1502 | echo "*** version of LIBPRELUDE. If it is not finding LIBPRELUDE, you'll need to set your" | 
|---|
|  | 1503 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | 
|---|
|  | 1504 | echo "*** to the installed location  Also, make sure you have run ldconfig if that" | 
|---|
|  | 1505 | echo "*** is required on your system" | 
|---|
|  | 1506 | echo "***" | 
|---|
|  | 1507 | echo "*** If you have an old version installed, it is best to remove it, although" | 
|---|
|  | 1508 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" | 
|---|
|  | 1509 | echo "***" ], | 
|---|
|  | 1510 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | 
|---|
|  | 1511 | echo "*** exact error that occured. This usually means LIBPRELUDE was incorrectly installed" | 
|---|
|  | 1512 | echo "*** or that you have moved LIBPRELUDE since it was installed. In the latter case, you" | 
|---|
|  | 1513 | echo "*** may want to edit the libprelude-config script: $LIBPRELUDE_CONFIG" ]) | 
|---|
|  | 1514 | CFLAGS="$ac_save_CFLAGS" | 
|---|
|  | 1515 | LDFLAGS="$ac_save_LDFLAGS" | 
|---|
|  | 1516 | LIBS="$ac_save_LIBS" | 
|---|
|  | 1517 | fi | 
|---|
|  | 1518 | fi | 
|---|
|  | 1519 | LIBPRELUDE_CFLAGS="" | 
|---|
|  | 1520 | LIBPRELUDE_LDFLAGS="" | 
|---|
|  | 1521 | LIBPRELUDE_LIBS="" | 
|---|
|  | 1522 | ifelse([$3], , :, [$3]) | 
|---|
|  | 1523 | fi | 
|---|
|  | 1524 | rm -f conf.libpreludetest | 
|---|
|  | 1525 | AC_SUBST(LIBPRELUDE_CFLAGS) | 
|---|
|  | 1526 | AC_SUBST(LIBPRELUDE_PTHREAD_CFLAGS) | 
|---|
|  | 1527 | AC_SUBST(LIBPRELUDE_LDFLAGS) | 
|---|
|  | 1528 | AC_SUBST(LIBPRELUDE_LIBS) | 
|---|
|  | 1529 | AC_SUBST(LIBPRELUDE_PREFIX) | 
|---|
|  | 1530 | AC_SUBST(LIBPRELUDE_CONFIG_PREFIX) | 
|---|
|  | 1531 | ]) | 
|---|
|  | 1532 |  | 
|---|
|  | 1533 | dnl *-*wedit:notab*-*  Please keep this as the last line. | 
|---|
|  | 1534 |  | 
|---|