| [2] | 1 | dnl aclocal.m4 generated automatically by aclocal 1.4
|
|---|
| 2 |
|
|---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
|---|
| 4 | dnl This file 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 | sinclude(../libtool.m4)
|
|---|
| 14 | dnl The lines below arrange for aclocal not to bring libtool.m4
|
|---|
| 15 | dnl AC_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
|
|---|
| 16 | dnl to add a definition of LIBTOOL to Makefile.in.
|
|---|
| 17 | ifelse(yes,no,[
|
|---|
| 18 | AC_DEFUN([AC_PROG_LIBTOOL],)
|
|---|
| 19 | AC_SUBST(LIBTOOL)
|
|---|
| 20 | ])
|
|---|
| 21 |
|
|---|
| 22 | AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
|---|
| 23 | [changequote(<<, >>)dnl
|
|---|
| 24 | dnl The name to #define.
|
|---|
| 25 | define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|---|
| 26 | dnl The cache variable name.
|
|---|
| 27 | define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
|---|
| 28 | changequote([, ])dnl
|
|---|
| 29 | AC_MSG_CHECKING(size of $1)
|
|---|
| 30 | AC_CACHE_VAL(AC_CV_NAME,
|
|---|
| 31 | [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
|---|
| 32 | AC_TRY_COMPILE([#include "confdefs.h"
|
|---|
| 33 | #include <sys/types.h>
|
|---|
| 34 | $2
|
|---|
| 35 | ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
|---|
| 36 | if test x$AC_CV_NAME != x ; then break; fi
|
|---|
| 37 | done
|
|---|
| 38 | ])
|
|---|
| 39 | if test x$AC_CV_NAME = x ; then
|
|---|
| 40 | AC_MSG_ERROR([cannot determine a size for $1])
|
|---|
| 41 | fi
|
|---|
| 42 | AC_MSG_RESULT($AC_CV_NAME)
|
|---|
| 43 | AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
|---|
| 44 | undefine([AC_TYPE_NAME])dnl
|
|---|
| 45 | undefine([AC_CV_NAME])dnl
|
|---|
| 46 | ])
|
|---|
| 47 |
|
|---|
| 48 | AC_DEFUN([AC_C_BIGENDIAN_CROSS],
|
|---|
| 49 | [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
|
|---|
| 50 | [ac_cv_c_bigendian=unknown
|
|---|
| 51 | # See if sys/param.h defines the BYTE_ORDER macro.
|
|---|
| 52 | AC_TRY_COMPILE([#include <sys/types.h>
|
|---|
| 53 | #include <sys/param.h>], [
|
|---|
| 54 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
|---|
| 55 | bogus endian macros
|
|---|
| 56 | #endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
|
|---|
| 57 | AC_TRY_COMPILE([#include <sys/types.h>
|
|---|
| 58 | #include <sys/param.h>], [
|
|---|
| 59 | #if BYTE_ORDER != BIG_ENDIAN
|
|---|
| 60 | not big endian
|
|---|
| 61 | #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
|
|---|
| 62 | if test $ac_cv_c_bigendian = unknown; then
|
|---|
| 63 | AC_TRY_RUN([main () {
|
|---|
| 64 | /* Are we little or big endian? From Harbison&Steele. */
|
|---|
| 65 | union
|
|---|
| 66 | {
|
|---|
| 67 | long l;
|
|---|
| 68 | char c[sizeof (long)];
|
|---|
| 69 | } u;
|
|---|
| 70 | u.l = 1;
|
|---|
| 71 | exit (u.c[sizeof (long) - 1] == 1);
|
|---|
| 72 | }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
|
|---|
| 73 | [ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
|
|---|
| 74 | fi])
|
|---|
| 75 | if test $ac_cv_c_bigendian = unknown; then
|
|---|
| 76 | AC_MSG_CHECKING(to probe for byte ordering)
|
|---|
| 77 | [
|
|---|
| 78 | cat >conftest.c <<EOF
|
|---|
| 79 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
|
|---|
| 80 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
|
|---|
| 81 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
|
|---|
| 82 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
|
|---|
| 83 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
|
|---|
| 84 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
|
|---|
| 85 | int main() { _ascii (); _ebcdic (); return 0; }
|
|---|
| 86 | EOF
|
|---|
| 87 | ] if test -f conftest.c ; then
|
|---|
| 88 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
|
|---|
| 89 | if test `grep -l BIGenDianSyS conftest.o` ; then
|
|---|
| 90 | echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
|
|---|
| 91 | ac_cv_c_bigendian=yes
|
|---|
| 92 | fi
|
|---|
| 93 | if test `grep -l LiTTleEnDian conftest.o` ; then
|
|---|
| 94 | echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
|
|---|
| 95 | if test $ac_cv_c_bigendian = yes ; then
|
|---|
| 96 | ac_cv_c_bigendian=unknown;
|
|---|
| 97 | else
|
|---|
| 98 | ac_cv_c_bigendian=no
|
|---|
| 99 | fi
|
|---|
| 100 | fi
|
|---|
| 101 | echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
|
|---|
| 102 | fi
|
|---|
| 103 | fi
|
|---|
| 104 | AC_MSG_RESULT($ac_cv_c_bigendian)
|
|---|
| 105 | fi
|
|---|
| 106 | if test $ac_cv_c_bigendian = yes; then
|
|---|
| 107 | AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
|
|---|
| 108 | BYTEORDER=4321
|
|---|
| 109 | else
|
|---|
| 110 | BYTEORDER=1234
|
|---|
| 111 | fi
|
|---|
| 112 | AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
|
|---|
| 113 | if test $ac_cv_c_bigendian = unknown; then
|
|---|
| 114 | AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
|
|---|
| 115 | fi
|
|---|
| 116 | ])
|
|---|
| 117 |
|
|---|
| 118 | # Like AC_CONFIG_HEADER, but automatically create stamp file.
|
|---|
| 119 |
|
|---|
| 120 | AC_DEFUN(AM_CONFIG_HEADER,
|
|---|
| 121 | [AC_PREREQ([2.12])
|
|---|
| 122 | AC_CONFIG_HEADER([$1])
|
|---|
| 123 | dnl When config.status generates a header, we must update the stamp-h file.
|
|---|
| 124 | dnl This file resides in the same directory as the config header
|
|---|
| 125 | dnl that is generated. We must strip everything past the first ":",
|
|---|
| 126 | dnl and everything past the last "/".
|
|---|
| 127 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
|---|
| 128 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
|---|
| 129 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
|---|
| 130 | <<am_indx=1
|
|---|
| 131 | for am_file in <<$1>>; do
|
|---|
| 132 | case " <<$>>CONFIG_HEADERS " in
|
|---|
| 133 | *" <<$>>am_file "*<<)>>
|
|---|
| 134 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
|---|
| 135 | ;;
|
|---|
| 136 | esac
|
|---|
| 137 | am_indx=`expr "<<$>>am_indx" + 1`
|
|---|
| 138 | done<<>>dnl>>)
|
|---|
| 139 | changequote([,]))])
|
|---|
| 140 |
|
|---|
| 141 | # Do all the work for Automake. This macro actually does too much --
|
|---|
| 142 | # some checks are only needed if your package does certain things.
|
|---|
| 143 | # But this isn't really a big deal.
|
|---|
| 144 |
|
|---|
| 145 | # serial 1
|
|---|
| 146 |
|
|---|
| 147 | dnl Usage:
|
|---|
| |
|---|