X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.in;h=4efaad3b199b140404f0cf7fb4a1c4f13e7f5e1e;hp=5f804d593ceb292e56166921caec0052b4990444;hb=6404682526633f7f2b9a2f94071d802b7b50dd07;hpb=301180c6c8edb98580ee6657e87f5a21342b5d96 diff --git a/configure.in b/configure.in index 5f804d5..4efaad3 100644 --- a/configure.in +++ b/configure.in @@ -1,10 +1,10 @@ -dnl Process this file with autoconf to produce a configure script. +IZEOFdnl Process this file with autoconf to produce a configure script. dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctrec.c) -AM_INIT_AUTOMAKE(ctsim,0.5.4-b2) +AM_INIT_AUTOMAKE(ctsim,0.5.4-b3) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -15,14 +15,19 @@ AC_PROG_RANLIB AC_PROG_CC AC_PROG_CXX + +dnl AC_MSG_CHECKING([that the compiler works]) +dnl AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) + dnl Check for C operation AC_CANONICAL_HOST -dnl AC_C_BIGENDIAN -dnl AC_C_INLINE -dnl AC_CHECK_SIZEOF(int) -dnl AC_CHECK_SIZEOF(long int) -dnl AC_CHECK_SIZEOF(float) -dnl AC_CHECK_SIZEOF(double) +AC_C_BIGENDIAN +AC_C_INLINE +AC_CHECK_SIZEOF(short, 2) +AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(float, 4) +AC_CHECK_SIZEOF(double, 8) AC_MSG_CHECKING(endian) @@ -32,14 +37,13 @@ i386* | i486* | i586* | i686* | vax*) CFLAGS="$CFLAGS -DENDIAN_LOW=1 -DENDIAN_HIGH=0" AC_MSG_RESULT(low) ;; -sparc* | mot*) +sparc* | mot* | ia64*) endian=high CFLAGS="$CFLAGS -DENDIAN_LOW=0 -DENDIAN_HIGH=1" AC_MSG_RESULT(high) ;; *) - AC_MSG_ERROR([Unknown host cpu $host_cpu -Can't set endian]) + AC_MSG_WARN([Unknown host cpu $host_cpu. Can't set endian]) ;; esac @@ -72,18 +76,18 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(strtod strtol snprintf htonl) AC_CHECK_FUNC(basename) AC_CHECK_FUNC(setjmp) -AC_CHECK_FUNC(getopt_long, -[ - getopt_long=true -], -[ +if ${OSTYPE} == "cygwin" ; then getopt_long=false +else + AC_CHECK_FUNC(getopt_long, [ getopt_long=true ], [ getopt_long=false ]) +fi +if test getopt_long == "false" ; then my_includes="$myincludes -I../getopt" AC_DEFINE(HAVE_GETOPT_LONG) ctlibs_base="$ctlibs_base -lgetopt" LDFLAGS="$LDFLAGS -L../getopt" AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1) -]) +fi AC_ADD_GCC_CFLAGS([-Wall]) @@ -201,6 +205,8 @@ if test "$withval" != "no" ; then fi done AC_MSG_RESULT($lamdir) +else + AC_MSG_RESULT([no]) fi AC_MSG_CHECKING([for web access])