"Fossies" - the Fresh Open Source Software Archive

Member "bas-2.6/configure.in" (2 Jul 2019, 3600 Bytes) of package /linux/privat/bas-2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.in": 2.5_vs_2.6.

    1 AC_INIT(bas.c)
    2 AC_CONFIG_HEADER(config.h)
    3 AC_CANONICAL_HOST
    4 VERSION=2.6
    5 UPDATED='July 2, 2019'
    6 
    7 ALL_LINGUAS="de"
    8 
    9 case $host in
   10   *-linux-*)
   11     if test "$prefix" = NONE
   12     then
   13       prefix=/usr
   14       AC_MSG_RESULT([using prefix $prefix])
   15     fi
   16   ;;
   17   hppa1.1-hp-hpux11.00)
   18     EXTRA_CFLAGS='+O2 +Onolimit -D_XOPEN_SOURCE_EXTENDED '
   19     EXTRA_LDFLAGS='-z '
   20     EXTRA_GCFLAGS='-D_XOPEN_SOURCE_EXTENDED '
   21     EXTRA_LDFLAGS='-Wl,-z '
   22   ;;
   23   *-cygwin)
   24     AC_DEFINE(USE_SELECT)
   25   ;;
   26   *)
   27     prefix=$ac_default_prefix
   28   ;;
   29 esac
   30 
   31 AC_PROG_CC
   32 if test "$GCC" = yes
   33 then
   34   CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wextra -Wshadow -Wno-unused-parameter -Wno-unused -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common"
   35   LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g"
   36 
   37   ac_save_CFLAGS="$CFLAGS"
   38   CFLAGS="$CFLAGS -Wunused-result"
   39   AC_MSG_CHECKING(if gcc accepts -Wunused-result)
   40   AC_TRY_COMPILE([],[return 0],AC_MSG_RESULT(yes),CFLAGS="$ac_save_CFLAGS"; AC_MSG_RESULT(no))
   41 else
   42   CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
   43   LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
   44 fi
   45 
   46 AC_PROG_RANLIB
   47 
   48 AC_PROG_LEX
   49 if test "x$LEX" != xflex; then
   50   AC_MSG_RESULT([no flex found, configure failed.])
   51   exit 1
   52 fi
   53 
   54 AC_CHECK_HEADERS(termcap.h,have_termcap_h=yes)
   55 if test "$have_termcap_h" != yes; then
   56   AC_CHECK_HEADERS(curses.h,have_curses_h=yes)
   57 fi
   58 
   59 AC_MSG_CHECKING(for tputs return type)
   60 AC_TRY_COMPILE([#ifdef HAVE_TERMCAP_H
   61 #include <termcap.h>
   62 #else
   63 #include <curses.h>
   64 #endif
   65 static int outc(int c){ return c; }
   66 ],[return tputs((char*)0,0,outc);
   67 ],AC_MSG_RESULT(int),AC_DEFINE(TPUTS_RETURNS_VOID) AC_MSG_RESULT(void))
   68 
   69 AC_CHECK_FUNC(fmod, [have_fmod=yes])
   70 if test "$have_fmod" != yes; then
   71         AC_CHECK_LIB(m, fmod, [have_fmod=yes; LIBS="-lm $LIBS"])
   72 fi
   73 if test "$have_fmod" != yes
   74 then
   75         AC_MSG_RESULT([no fmod() found, configure failed.])
   76         exit 1
   77 fi
   78 
   79 AC_CHECK_HEADERS(tgmath.h,have_tgmath_h=yes)
   80 AC_CHECK_FUNCS(lrint)
   81 AC_CHECK_FUNCS(nanosleep)
   82 
   83 AC_CHECK_FUNCS(tgetent,have_tgetent=yes)
   84 if test "$have_tgetent" != yes; then
   85   AC_CHECK_LIB(curses, tgetent,AC_DEFINE(HAVE_TGETENT) have_tgetent=yes; LIBS="-lcurses $LIBS")
   86 fi
   87 if test "$have_tgetent" != yes; then
   88         AC_CHECK_LIB(termcap, tgetent, AC_DEFINE(HAVE_TGETENT) [have_tgetent=yes; LIBS="-ltermcap $LIBS"])
   89 fi
   90 # The following applies to sick Linux distributions.
   91 if test "$have_tgetent" != yes; then
   92        AC_CHECK_LIB(ncurses, tgetent, AC_DEFINE(HAVE_TGETENT) [have_tgetent=yes; LIBS="-lncurses $LIBS"])
   93 fi
   94 
   95 AC_ARG_WITH(dmalloc,
   96   [  --with-dmalloc=DIR      dmalloc include/library installation prefix],
   97   [CPPFLAGS="$CPPFLAGS -I$with_dmalloc/include"
   98   LDFLAGS="$LDFLAGS -L$with_dmalloc/lib"
   99   LIBS="$LIBS -ldmalloc"
  100   AC_DEFINE(USE_DMALLOC)]
  101 )
  102 
  103 AC_ARG_WITH(efence,
  104   [  --with-efence=DIR       efence include/library installation prefix],
  105   [CPPFLAGS="$CPPFLAGS -I$with_efence/include"
  106   LDFLAGS="$LDFLAGS -L$with_efence/lib"
  107   LIBS="$LIBS -lefence"]
  108 )
  109 
  110 AC_ARG_WITH(valgrind,
  111   [  --with-valgrind         run regression tests with valgrind],
  112   [VALGRIND="valgrind"
  113   AC_SUBST(VALGRIND)]
  114 )
  115 
  116 USE_NLS=no
  117 AC_CHECK_PROG(MSGFMT,msgfmt,yes,no)
  118 if test "$MSGFMT" = yes
  119 then
  120   AC_CHECK_HEADERS(libintl.h,[LIBINTL=yes])
  121   if test "$LIBINTL" = yes
  122   then
  123     AC_SEARCH_LIBS(gettext,intl,[AC_DEFINE(HAVE_GETTEXT) USE_NLS=yes])
  124   fi
  125 fi
  126 
  127 AC_SYS_LARGEFILE
  128 
  129 AC_PROG_INSTALL
  130 
  131 AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
  132 AC_SUBST(VERSION)
  133 AC_SUBST(UPDATED)
  134 AC_SUBST(USE_NLS)
  135 AC_OUTPUT(Makefile bas.1 test/runbas)
  136 chmod 755 test/runbas