dnl -*-fundamental-*- dnl dnl $Id: configure.in,v 1.2 1999/06/04 13:56:36 mdw Exp $ dnl dnl Configuration for sw-tools dnl dnl (c) 1999 EBI dnl dnl ----- Licensing notice -------------------------------------------------- dnl dnl This file is part of sw-tools. dnl dnl sw-tools is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl sw-tools is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with sw-tools; if not, write to the Free Software Foundation, dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl ----- Revision history -------------------------------------------------- dnl dnl $Log: configure.in,v $ dnl Revision 1.2 1999/06/04 13:56:36 mdw dnl Bump version. dnl dnl Revision 1.1.1.1 1999/06/02 16:53:33 mdw dnl Initial import. dnl dnl --- Boring boilerplate --- AC_INIT(src/sw.c) AM_INIT_AUTOMAKE(sw-tools, 1.0.0pre4) AM_CONFIG_HEADER(config.h) dnl --- Work out the architecture name --- AC_MSG_CHECKING([architecture name]) arch=`$srcdir/sw.in --archname` AC_MSG_RESULT($arch) AC_DEFINE_UNQUOTED(ARCH, "$arch") AC_SUBST(arch) dnl --- Set up the C compiler --- AC_PROG_CC mdw_GCC_FLAGS dnl --- Check for --- AC_CHECK_HEADERS(unistd.h) dnl --- Find an appropriate remote shell program --- AC_ARG_WITH(rsh, [ --with-rsh=PROGRAM use PROGRAM to start remote shells], [RSH=$withval]) AC_PATH_PROGS(RSH, $RSH remsh rsh ssh, rsh) AC_DEFINE_UNQUOTED(RSH, "$RSH") dnl --- Find out whether I have `strsignal' or `sys_siglist' --- AC_CHECK_FUNCS(strsignal _sys_siglist, break) dnl --- Decide whether to declare `environ' --- AC_CACHE_CHECK([for declaration of \`environ'], sw_cv_environ, [AC_EGREP_CPP(environ, [#include #if HAVE_UNISTD_H #include #endif #if STDC_HEADERS #include #include #endif], [sw_cv_environ=yes], [sw_cv_environ=no])]) if test $sw_cv_environ = yes; then AC_DEFINE(DECL_ENVIRON) fi dnl --- Find a curses library --- dnl dnl Try to find one which knows how to resize a terminal. mdw_CHECK_MANYLIBS(newwin, ncurses curses, AC_DEFINE(HAVE_CURSES)) if test $mdw_cv_lib_newwin != no; then AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h curses.h], [break]) if test "$ac_cv_header_ncurses_h" = "no" && test "$ac_cv_header_ncurses_ncurses_h" = "no" && test "$ac_cv_header_curses_h" = "no"; then AC_MSG_WARN([couldn't find a \`curses' header. Assuming \`curses.h'.]) AC_DEFINE(HAVE_CURSES_H) fi AC_CHECK_FUNCS(wresize) fi dnl --- Other handy libraries --- mdw_CHECK_MANYLIBS(socketpair, socket) dnl --- Various standard types --- AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T AC_CACHE_CHECK(for ssize_t, sw_cv_ssize_t, [AC_EGREP_CPP(ssize_t, [#include #if HAVE_UNISTD_H #include #endif #if STDC_HEADERS #include #include #endif], [sw_cv_ssize_t=yes], [sw_cv_ssize_t=no])]) if test $sw_cv_ssize_t = no; then AC_DEFINE(ssize_t, int) fi dnl --- Write in some useful paths --- mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'` test "$prefix" = "NONE" && prefix=$ac_default_prefix test "$exec_prefix" = "NONE" && exec_prefix=$prefix SW=`echo sw|sed "$transform"` AC_SUBST(SW) AC_DEFINE_UNQUOTED(PREFIX, "$mdw_prefix") AC_DEFINE_UNQUOTED(BINDIR, "`eval echo $bindir`") AC_DEFINE_UNQUOTED(DATADIR, "`eval echo $datadir`") AC_DEFINE_UNQUOTED(SW, "$SW") prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix dnl --- Output the configuration --- AC_CONFIG_SUBDIRS(mLib) AC_OUTPUT(Makefile src/Makefile sw) dnl ----- That's all, folks -------------------------------------------------