Branch: Tag:

2010-01-18

2010-01-18 15:43:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Lots of cosmetic fixes.
Reduced the number of chained if-else statements by using elif in more places.

Rev: src/configure.in:1.1091

1: - AC_REVISION("$Id: configure.in,v 1.1090 2009/12/09 20:18:51 jonasw Exp $") + AC_REVISION("$Id: configure.in,v 1.1091 2010/01/18 15:43:33 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
436:    AC_MSG_RESULT(yes)    fi    fi - else -  if test "x$TCC" = "xyes"; then + elif test "x$TCC" = "xyes"; then    AC_MSG_CHECKING(if we can use pragma TenDRA longlong)    AC_CACHE_VAL(pike_cv_pragma_tendra_longlong, [    AC_TRY_COMPILE([
471:    AC_MSG_RESULT(no)    fi    else :; fi - fi +       #############################################################################   
539:    CC="$BINDIR/nobinary_dummy cc"    RUNPIKE="USE_PIKE"    RUNTPIKE="USE_PIKE" - else -  if test "x$cross_compiling" = "xyes"; then + elif test "x$cross_compiling" = "xyes"; then    RUNPIKE="DEFAULT_RUNPIKE"    RUNTPIKE="USE_PIKE"   else    RUNPIKE="DEFAULT_RUNPIKE"    RUNTPIKE="USE_TPIKE"   fi - fi +    AC_SUBST(RUNPIKE)   AC_SUBST(RUNTPIKE)   
676:    pike_cv_is_mingw="yes";;    *) pike_cv_sys_os="Unknown";;    esac - else - if test "$uname_prog" != "no"; then + elif test "$uname_prog" != "no"; then    # uname on UNICOS doesn't work like other people's uname...    if getconf CRAY_RELEASE >/dev/null 2>&1; then    pike_cv_sys_os="UNICOS"
709:   else    pike_cv_sys_os="Not Solaris"   fi - fi +    ])   AC_MSG_RESULT($pike_cv_sys_os)   
909:    PIKE_MSG_WARN([rntcc/rntcl/rnticl/rntecl detected.])    AC_PATH_PROGS(SMARTBUILDCC,gcc cc egcs,gcc, $PATH:$EXTRA_PATH)    echo Using $SMARTBUILDCC to compile smartlink. -  else -  if test "x$ac_cv_prog_cc_cross" = "xyes"; then +  elif test "x$ac_cv_prog_cc_cross" = "xyes"; then    PIKE_MSG_WARN([Crosscompiler detected.])    AC_PATH_PROGS(SMARTBUILDCC, gcc cc egcs, gcc, /usr/bin:/bin/:/usr/ccs/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/csw/bin:$PATH:$EXTRA_PATH)    echo Using $SMARTBUILDCC to compile smartlink.    fi -  fi +        rm -f "$SMARTLINK"   
1126:    # It's usually hidden in $prefix/sparc-sun-solaris2.?/bin/.    # NOTE: M4 uses [] as quotes.    gcc_ld_path="`$CC -v 2>&1 | sed -e '1,1s/[[^\/]]*\(\/.*\/\)[[^\/]]*$/\1/p;d' | sed -e '/lib\/gcc-lib\//s/lib\/gcc-lib\///;s/\/[[0-9]]*\.[[0-9]]*\.[[0-9]]*\/$/\/bin/'`" -  if test "x$gcc_ld_path" = "x"; then :; else -  if test -d "$gcc_ld_path/."; then +  if test "x$gcc_ld_path" = "x"; then :; +  elif test -d "$gcc_ld_path/."; then    if "$gcc_ld_path/ld" -v 2>&1 | grep -i GNU >/dev/null; then    PIKE_MSG_WARN([GNU ld found on Solaris sparc system ($gcc_ld_path/ld).   This may cause the dynamic module support to fail.])    else :; fi    else :; fi -  fi +     unset gcc_ld_path      
1386:    [do not enable bundled libraries]),    [], [with_bundles=yes])   pike_bundle_dir="" - if test "$with_bundles" = "no"; then :; else -  if test -d "$with_bundles/."; then + if test "$with_bundles" = "no"; then +  :; + elif test -d "$with_bundles/."; then    # The user has specified a bundle directory. Use it.    pike_bundle_dir="$with_bundles"   elif test -d "$srcdir/../bundles/."; then    # We have a bundle directory; enable them if needed.    pike_bundle_dir=`cd "$srcdir/../bundles" && pwd`   fi - fi +    test -d bundles/. || mkdir bundles   if test -d bundles/.; then    touch bundles/no_testsuites
1601:    # poll(2) is broken on AIX 4.1 and earlier.    if test "`uname -r`" -ge 2 -a "`uname -v`" -ge 4 ; then    with_poll=yes -  else if test "`uname -v`" -gt 4 ; then +  elif test "`uname -v`" -gt 4 ; then    with_poll=yes    else :; fi -  fi +     ;;    esac   ])
1782:   #   # --with-dmalloc requires --with-rtldebug   # - if test "x$with_dmalloc" = "x"; then :; else -  if test "x$with_rtldebug" = "xyes"; then :; else + if test "x$with_dmalloc" = "x"; then +  :; + elif test "x$with_rtldebug" = "xyes"; then :; else    PIKE_MSG_WARN([Debug malloc requires rtldebug. Enabling rtldebug.])    with_rtldebug=yes   fi - fi +          #
2456:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1090 2009/12/09 20:18:51 jonasw Exp $. + # Automatically generated by $Id: configure.in,v 1.1091 2010/01/18 15:43:33 grubba Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2494:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1090 2009/12/09 20:18:51 jonasw Exp $. + # Automatically generated by $Id: configure.in,v 1.1091 2010/01/18 15:43:33 grubba Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2503:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1090 2009/12/09 20:18:51 jonasw Exp $. + # Automatically generated by $Id: configure.in,v 1.1091 2010/01/18 15:43:33 grubba Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
2710:   ac_c_preproc_warn_flag="$OLD_ac_c_preproc_warn_flag"      if test "x$with_lib_path" = "x"; then -  if test "x$with_dynamic_modules" = "xno"; then :; else -  if test "x$GCC" = "xno"; then :; else +  if test "x$with_dynamic_modules" = "xno"; then +  :; +  elif test "x$GCC" = "xno"; then :; else    # Extract the default library paths from gcc,    # so that we can pass them along to ld later on.    for dd in `$CC -print-search-dirs 2>/dev/null | sed -e '/^libraries:/s/^[[^=]]*=//p' -ed | sed -e 's/\/:/ /g' -e 's/:/ /g' -e 's/\/$//'` /lib; do
2758:    done    fi    fi - fi +       else    # We are running NT without MinGW
5337:      if grep STACK_DIRECTION confdefs.h >/dev/null 2>&1; then    : - else -  if test "x$pike_cv_hardware_stack_direction" = "xup" ; then + elif test "x$pike_cv_hardware_stack_direction" = "xup" ; then    AC_DEFINE(STACK_DIRECTION, 1)   else    AC_DEFINE(STACK_DIRECTION, -1)   fi - fi +       ########################################################################   
5420:    fprintf(f, "%d\n", align);    fclose(f);    return 0; - }], + } +  ],   pike_cv_hardware_alignment=`cat conftest.out.2`,   pike_cv_hardware_alignment=4,   pike_cv_hardware_alignment=4
6010:   if test "x$with_mmx" = xno; then    mmx_reason=' (--without-mmx)'    unset pike_cv_sys_has_working_mmx - else - if test "x$ac_cv_header_mmx_h" = xyes -o "x$ac_cv_header_asm_mmx_h" = xyes; then + elif test "x$ac_cv_header_mmx_h" = xyes -o "x$ac_cv_header_asm_mmx_h" = xyes; then    AC_MSG_CHECKING(for working MMX)    mmx_reason=' (mmx.h found, but mmx operations failed)'   
6047:    PIKE_MSG_WARN([--without-mmx is advisable when using --without-copt.])    fi   else :; fi - fi +       #############################################################################   
6254:    if test -f "conftest.$ac_objext"; then    if strings "conftest.$ac_objext" | grep "iEeE_bIg" >/dev/null; then    pike_cv_float_type=ieee_big -  else -  if strings "conftest.$ac_objext" | grep "EeEigIb_" >/dev/null; then +  elif strings "conftest.$ac_objext" | grep "EeEigIb_" >/dev/null; then    pike_cv_float_type=ieee_little    else    pike_cv_float_type=not_ieee    fi -  fi +     else    AC_MSG_WARN([Object file not found - using default.])    pike_cv_float_type=not_ieee
6274:   if test "$pike_cv_float_type" = ieee_big; then    AC_MSG_RESULT(IEEE big endian)    AC_DEFINE(FLOAT_IS_IEEE_BIG) - else -  if test "$pike_cv_float_type" = ieee_little; then + elif test "$pike_cv_float_type" = ieee_little; then    AC_MSG_RESULT(IEEE little endian)    AC_DEFINE(FLOAT_IS_IEEE_LITTLE)   else    AC_MSG_RESULT(not IEEE)   fi - fi +       AC_MSG_CHECKING(for type of double)   AC_CACHE_VAL(pike_cv_double_type, [
6307:    if test -f "conftest.$ac_objext"; then    if strings "conftest.$ac_objext" | grep "iEeE_bIg" >/dev/null; then    pike_cv_double_type=ieee_big -  else -  if strings "conftest.$ac_objext" | grep "gIb_EeEi" >/dev/null; then +  elif strings "conftest.$ac_objext" | grep "gIb_EeEi" >/dev/null; then    pike_cv_double_type=ieee_little    else    pike_cv_double_type=not_ieee    fi -  fi +     else    AC_MSG_WARN([Object file not found - using default.])    pike_cv_float_type=not_ieee
6327:   if test "$pike_cv_double_type" = ieee_big; then    AC_MSG_RESULT(IEEE big endian)    AC_DEFINE(DOUBLE_IS_IEEE_BIG) - else -  if test "$pike_cv_double_type" = ieee_little; then + elif test "$pike_cv_double_type" = ieee_little; then    AC_MSG_RESULT(IEEE little endian)    AC_DEFINE(DOUBLE_IS_IEEE_LITTLE)   else    AC_MSG_RESULT(not IEEE)   fi - fi +       #############################################################################   
6368:   #if STDC_HEADERS   #include <stdlib.h>   #include <stddef.h> - #endif], ac_cv_type_sig_atomic_t=yes, ac_cv_type_sig_atomic_t=no)]) + #endif +  ], ac_cv_type_sig_atomic_t=yes, ac_cv_type_sig_atomic_t=no) + ])   AC_MSG_RESULT($ac_cv_type_sig_atomic_t)   if test x"$ac_cv_type_sig_atomic_t" = xno; then    AC_DEFINE(sig_atomic_t, int)
6445:    sigrun[0]=0;    exit(0);   } - ],pike_cv_sys_signal_oneshot=no,pike_cv_sys_signal_oneshot=yes,pike_cv_sys_signal_oneshot=yes)]) +  ],pike_cv_sys_signal_oneshot=no,pike_cv_sys_signal_oneshot=yes,pike_cv_sys_signal_oneshot=yes) + ])      if test "$pike_cv_sys_signal_oneshot" = yes; then    AC_MSG_RESULT(yes)
6555:    pike_cv_func_getrusage_full=yes   ,    pike_cv_func_getrusage_full=no - )]) +  ) + ])      if test "$pike_cv_func_getrusage_full" = yes; then    AC_MSG_RESULT(all there)
6888:   #endif   ], [   #ifdef va_copy - /* If there's a macro with this name we assume it takes the place of the function. */ +  /* If there is a macro with this name we assume it takes the place of the function. */   return 0;   #else   return f != va_copy;
7302:    if(pollset[e].revents & POLLIN) pang(e);    }    } - } ], + } +  ],   pike_cv_system_oob_working="`cat conftest.out.2`",   pike_cv_system_oob_working=UNKNOWN,   pike_cv_system_oob_working=UNKNOWN)
7366:    ],    pike_cv_have_union_init=yes,    pike_cv_have_union_init=no, -  pike_cv_have_union_init=no)]) +  pike_cv_have_union_init=no) + ])   AC_MSG_RESULT($pike_cv_have_union_init)   if test "$pike_cv_have_union_init" = yes; then    AC_DEFINE(HAVE_UNION_INIT)
7790:    if test "$GCC" = yes ; then    if test "`uname -r`" -ge 2 -a "`uname -v`" -eq 4 ; then    LDSHARED="ld -G -bexpall" -  else if test "`uname -v`" -gt 4 ; then +  elif test "`uname -v`" -gt 4 ; then    # AIX 5L+    LDSHARED="ld -G"    else
7802:    pike_cv_sys_dynamic_loading=no    LDSHARED="ld"    fi -  fi -  else -  if test "`uname -r`" -ge 3 -a "`uname -v`" -eq 4 ; then +  elif test "`uname -r`" -ge 3 -a "`uname -v`" -eq 4 ; then    LDSHARED="ld -G -bexpall" -  else if test "`uname -v`" -gt 4 ; then +  elif test "`uname -v`" -gt 4 ; then    # AIX 5L+    LDSHARED="ld -G"    else
7818:    pike_cv_sys_dynamic_loading=no    LDSHARED="ld"    fi -  fi -  fi +     ;;    Darwin*)    if test "$pike_cv_osx_twolevel_namespace" = yes ; then
8869:   float_is_ieee=""   if test "x$float_type" = "xfloat" -a "x$pike_cv_float_type" = "xieee_big"; then    float_is_ieee=" (ieee big endian)" - else if test "x$float_type" = "xfloat" -a "x$pike_cv_float_type" = "xieee_little"; then + elif test "x$float_type" = "xfloat" -a "x$pike_cv_float_type" = "xieee_little"; then    float_is_ieee=" (ieee little endian)" - else if test "x$float_type" = "xdouble" -a "x$pike_cv_double_type" = "xieee_big"; then + elif test "x$float_type" = "xdouble" -a "x$pike_cv_double_type" = "xieee_big"; then    float_is_ieee=" (ieee big endian)" - else if test "x$float_type" = "xdouble" -a "x$pike_cv_double_type" = "xieee_little"; then + elif test "x$float_type" = "xdouble" -a "x$pike_cv_double_type" = "xieee_little"; then    float_is_ieee=" (ieee little endian)" - fi; fi; fi; fi + fi      cat >>config.info <<EOF   =========================================================