1 2dnl $QNS: configure.in,v 1.2 2001/12/18 18:33:35 bright Exp $ 3 4dnl Process this file with autoconf to produce a configure script. 5AC_INIT(cvswrap.c) 6 7 8dnl Yanked from screen. 9define(AC_NOTE, 10[echo "$1" 1>&AC_FD_MSG 11])dnl 12 13PROGRAM="cvswrap" 14VERSION="0.9" 15PACKAGE="${PROGRAM}-${VERSION}" 16AC_NOTE(this is cvswrap version $VERSION) 17 18AC_PREFIX_PROGRAM(cvswrap) 19 20dnl Checks for programs. 21AC_PROG_CC 22AC_PROG_INSTALL 23 24dnl Checks for libraries. 25LIBOBJS="" 26AC_SUBST(LIBOBJS) 27PREFIX=$prefix 28AC_SUBST(PREFIX) 29 30dnl Checks for header files. 31AC_HEADER_STDC 32AC_HEADER_SYS_WAIT 33AC_CHECK_HEADERS(sys/time.h unistd.h) 34 35dnl Checks for typedefs, structures, and compiler characteristics. 36AC_C_CONST 37AC_TYPE_PID_T 38AC_TYPE_SIZE_T 39AC_STRUCT_ST_BLKSIZE 40AC_HEADER_TIME 41 42AC_MSG_CHECKING(for if your compiler supports __func__) 43AC_TRY_RUN([#include <string.h> 44main() 45{ 46 return(strcmp("main", __func__) == 0 ? 0 : 1); 47}],[ 48 AC_MSG_RESULT(yes) 49 func="__func__"; 50],[ 51 AC_MSG_RESULT(no) 52]) 53 54if test "x$func" = "x" ; then 55AC_MSG_CHECKING(for if your compiler supports __FUNCTION__) 56AC_TRY_RUN([#include <string.h> 57main() 58{ 59 return(strcmp("main", __FUNCTION__) == 0 ? 0 : 1); 60}],[ 61 AC_MSG_RESULT(yes) 62 func="__FUNCTION__"; 63],[ 64 AC_MSG_RESULT(no) 65]) 66fi 67 68if test "x$func" = "x" ; then 69 func="__FILE__"; 70fi 71 72AC_DEFINE_UNQUOTED(FUNCDEF, $func) 73 74AC_MSG_CHECKING(for specified path to real cvs(1)) 75HARD_PATH_REALCVS="/usr/bin/ncvs" 76PATH_REALCVS=${HARD_PATH_REALCVS} 77AC_ARG_WITH(real-cvs, 78[ --with-real-cvs=path where to expect the real cvs(1) binary to be ], 79[ PATH_REALCVS="${withval}" ]) 80if test "x${PATH_REALCVS}" = "x${HARD_PATH_REALCVS}" ; then 81 AC_MSG_RESULT(default: '${PATH_REALCVS}') 82else 83 AC_MSG_RESULT('${PATH_REALCVS}') 84fi 85AC_DEFINE_UNQUOTED(PATH_REALCVS, "${PATH_REALCVS}") 86 87AC_DEFINE_UNQUOTED(SYSCONFDIR, $sysconfdir) 88 89dnl Checks for library functions. 90AC_CHECK_FUNCS(gettimeofday strcspn strdup strerror) 91 92AC_CONFIG_HEADER(config.h) 93 94AC_OUTPUT(Makefile) 95