Changeset 43


Ignore:
Timestamp:
Jun 5, 2006, 9:18:36 PM (19 years ago)
Author:
rainer
Message:

Fix for ticket #19 (autoconf problem)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/aclocal.m4

    r40 r43  
    1010dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    1111dnl PARTICULAR PURPOSE.
    12 
    13 # Do all the work for Automake.  This macro actually does too much --
    14 # some checks are only needed if your package does certain things.
    15 # But this isn't really a big deal.
    16 
    17 # serial 1
    18 
    19 
    20 # serial 1
    2112
    2213#
     
    2516AC_DEFUN([AM_INIT_AUTOMAKE],
    2617[
    27 AC_REQUIRE([AM_PROG_INSTALL])
     18AC_REQUIRE([AC_PROG_INSTALL])
    2819PACKAGE=[$1]
    2920AC_SUBST(PACKAGE)
     
    3930AC_REQUIRE([AC_PROG_MAKE_SET])])
    4031
    41 
    42 # serial 1
    43 
    44 # @defmac AC_PROG_CC_STDC
    45 # @maindex PROG_CC_STDC
    46 # @ovindex CC
    47 # If the C compiler in not in ANSI C mode by default, try to add an option
    48 # to output variable @code{CC} to make it so.  This macro tries various
    49 # options that select ANSI C on some system or another.  It considers the
    50 # compiler to be in ANSI C mode if it handles function prototypes correctly.
    51 #
    52 # If you use this macro, you should check after calling it whether the C
    53 # compiler has been set to accept ANSI C; if not, the shell variable
    54 # @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
    55 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
    56 # program @code{ansi2knr}, which comes with Ghostscript.
    57 # @end defmac
    58 
    59 AC_DEFUN([AM_PROG_CC_STDC],
    60 [AC_REQUIRE([AC_PROG_CC])
    61 AC_BEFORE([$0], [AC_C_INLINE])
    62 AC_BEFORE([$0], [AC_C_CONST])
    63 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
    64 dnl a magic option to avoid problems with ANSI preprocessor commands
    65 dnl like #elif.
    66 dnl FIXME: can't do this because then AC_AIX won't work due to a
    67 dnl circular dependency.
    68 dnl AC_BEFORE([$0], [AC_PROG_CPP])
    69 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
    70 AC_CACHE_VAL(am_cv_prog_cc_stdc,
    71 [am_cv_prog_cc_stdc=no
    72 ac_save_CC="$CC"
    73 # Don't try gcc -ansi; that turns off useful extensions and
    74 # breaks some systems' header files.
    75 # AIX                   -qlanglvl=ansi
    76 # Ultrix and OSF/1      -std1
    77 # HP-UX                 -Aa -D_HPUX_SOURCE
    78 # SVR4                  -Xc -D__EXTENSIONS__
    79 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
    80 do
    81   CC="$ac_save_CC $ac_arg"
    82   AC_TRY_COMPILE(
    83 [#include <stdarg.h>
    84 #include <stdio.h>
    85 #include <sys/types.h>
    86 #include <sys/stat.h>
    87 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
    88 struct buf { int x; };
    89 FILE * (*rcsopen) (struct buf *, struct stat *, int);
    90 static char *e (p, i)
    91      char **p;
    92      int i;
    93 {
    94   return p[i];
    95 }
    96 static char *f (char * (*g) (char **, int), char **p, ...)
    97 {
    98   char *s;
    99   va_list v;
    100   va_start (v,p);
    101   s = g (p, va_arg (v,int));
    102   va_end (v);
    103   return s;
    104 }
    105 int test (int i, double x);
    106 struct s1 {int (*f) (int a);};
    107 struct s2 {int (*f) (double a);};
    108 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
    109 int argc;
    110 char **argv;
    111 ], [
    112 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
    113 ],
    114 [am_cv_prog_cc_stdc="$ac_arg"; break])
    115 done
    116 CC="$ac_save_CC"
    117 ])
    118 if test -z "$am_cv_prog_cc_stdc"; then
    119   AC_MSG_RESULT([none needed])
    120 else
    121   AC_MSG_RESULT($am_cv_prog_cc_stdc)
    122 fi
    123 case "x$am_cv_prog_cc_stdc" in
    124   x|xno) ;;
    125   *) CC="$CC $am_cv_prog_cc_stdc" ;;
    126 esac
    127 ])
    12832
    12933# Define a conditional.
  • trunk/configure.ac

    r40 r43  
    1 dnl We want to override the standard AC_INIT_PARSE_ARGS,
    2 dnl which requires replacing AC_INIT() with its expanded
    3 dnl content.
    4 dnl
    5 dnl include own macros
    6 dnl
    7 sinclude(acsite.m4)dnl
    8 sinclude(./aclocal.m4)dnl
    9 
    10 dnl
    11 dnl AC_INIT(samhain.c)
    12 dnl
    13 # Forbidden tokens and exceptions.
    14 m4_pattern_forbid([^_?A[CHUM]_])
    15 m4_pattern_forbid([_AC_])
    16 m4_pattern_forbid([^LIBOBJS$],
    17                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs. LIBOBJS'])
    18 # Actually reserved by M4sh.
    19 m4_pattern_allow([^AS_FLAGS$])
    20 AS_INIT
    21 dnl m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
    22 _AC_INIT_DEFAULTS
    23 SH_INIT_PARSE_ARGS
    24 _AC_INIT_SRCDIR
    25 SH_INIT_HELP
    26 _AC_INIT_VERSION
    27 _AC_INIT_CONFIG_LOG
    28 _AC_INIT_PREPARE
    29 _AC_INIT_NOTICE
    30 _AC_INIT_COPYRIGHT
    31 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
     1
     2dnl We want to override the standard _AC_INIT_PARSE_ARGS
     3dnl
     4AU_ALIAS([_AC_INIT_PARSE_ARGS], [SH_INIT_PARSE_ARGS])
     5AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP])
     6
     7AC_INIT(src/samhain.c)
     8
    329
    3310AC_ARG_VAR([LIBS],
Note: See TracChangeset for help on using the changeset viewer.