dnl configure.in for gcvs AC_INIT(ChangeLog) AC_PATH_PROG(gcvspath, gcvs) dnl For automake. . $srcdir/GCVS-VERSION AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) AM_CONFIG_HEADER(config.h) AC_PREFIX_DEFAULT(${GCVSDIR:-/usr/local}) AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_PROG_CC AC_PROG_CXX AC_AIX AC_C_CONST dnl Transforming Program Names When Installing dnl AC_ARG_PROGRAM dnl Look for the install program AC_PROG_INSTALL dnl Look for the ranlib program AC_PROG_RANLIB dnl Look for yacc (bison) program AC_PROG_YACC AM_PROG_LEX test -n "$YACC" && YACC="$YACC -d" dnl If the package is not flat AC_PROG_MAKE_SET dnl AM_WITH_REGEX AC_HEADER_STDC AC_CHECK_HEADERS(errno.h unistd.h string.h strings.h memory.h utime.h \ fcntl.h getopt.h limits.h sys/file.h pwd.h \ sys/param.h sys/select.h sys/time.h sys/timeb.h \ io.h direct.h) AC_HEADER_SYS_WAIT AC_HEADER_STAT AC_HEADER_TIME AC_HEADER_DIRENT AC_TYPE_SIGNAL AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_SIZE_T AC_TYPE_PID_T AC_REPLACE_FUNCS(mkdir rename strerror memmove vasprintf) AC_CHECK_FUNCS(mktemp putenv vprintf tempnam unsetenv) AC_PATH_X dnl If we're using GCC, ask for aggressive warnings. case "$GCC" in yes ) CPPFLAGS="$CPPFLAGS -Wall" ;; esac dnl We only support GTK+ >= 1.2.0 now. AM_PATH_GTK(1.2.0, [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"], AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) dnl Set the c++ and the linker flags CPPFLAGS="$CPPFLAGS -DqUnix -DqGTK" CFLAGS="$CFLAGS -DqUnix -DqGTK" LDFLAGS="$LDFLAGS" test -n "$x_includes" && CPPFLAGS="$CPPFLAGS -I$x_includes" test -n "$x_includes" && CFLAGS="$CFLAGS -I$x_includes" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" dnl User specified location of the tcl include ac_has_tclinc=no ac_has_tcllib=no dnl some default locations for tcl.h prefix_locations="$prefix /usr/local/include /usr/include .." exec_prefix_locations="$exec_prefix /usr/local/lib /usr/lib .." dnl common tcl folder prefixes tcl_versions="tcl8.4 tcl8.3" AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR use Tcl 8.x includes from DIR], TCL_INCLUDE_DIR=$withval, [ TCL_INCLUDE_DIR=/usr/include for f in $prefix_locations ; do for t in $tcl_versions . ; do if test -r "$f/$t/tcl.h"; then break fi done if test -r "$f/$t/tcl.h"; then TCL_INCLUDE_DIR=$f/$t dnl AC_MSG_RESULT(setting TCL_INCLUDE_DIR to $TCL_INCLUDE_DIR) break fi done ]) AC_MSG_CHECKING([for tcl.h]) if test -f $TCL_INCLUDE_DIR/tcl.h; then AC_MSG_RESULT($TCL_INCLUDE_DIR/tcl.h) ac_has_tclinc=yes else AC_MSG_WARN([Cannot find $TCL_INCLUDE_DIR/tcl.h, try --with-tclinclude=DIR]) fi dnl User specified location of the tcl lib AC_ARG_WITH(tcllib, [ --with-tcllib=DIR use Tcl 8.x lib from DIR], TCL_LIB_DIR=$withval, [ TCL_LIB_DIR=/usrlib/ for f in $exec_prefix_locations ; do for t in $tcl_versions . ; do if test -r "$f/$t/tclConfig.sh"; then break fi done if test -r "$f/$t/tclConfig.sh"; then TCL_LIB_DIR=$f/$t dnl AC_MSG_RESULT(setting TCL_LIB_DIR to $TCL_LIB_DIR) break fi done ]) AC_MSG_CHECKING([for tclConfig.sh]) if test -f $TCL_LIB_DIR/tclConfig.sh; then AC_MSG_RESULT($TCL_LIB_DIR/tclConfig.sh) ac_has_tcllib=yes else AC_MSG_WARN([Cannot find $TCL_LIB_DIR/tclConfig.sh, try --with-tcllib=DIR]) fi HAVE_TCL=0 TCL_CFLAGS= TCL_LIB_SPEC= if test $ac_has_tclinc = yes -a $ac_has_tcllib = yes ; then HAVE_TCL=1 file=$TCL_LIB_DIR/tclConfig.sh . $file # The variables that we use from tclConfig.sh TCL_CFLAGS=-I$TCL_INCLUDE_DIR $TCL_CFLAGS TCL_LIB_SPEC=$TCL_LIB_SPEC # TCL_LIB_SPEC="-L$TCL_PACKAGE_PATH -ltcl" fi AC_SUBST(HAVE_TCL) AC_SUBST(TCL_CFLAGS) AC_SUBST(TCL_LIB_SPEC) dnl qCvsDebug AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging (default = yes)], [case "${enableval}" in yes) debug=true ;; no) debug=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac],[debug=yes]) AM_CONDITIONAL(DEBUG, test x$debug = xtrue) if test "$debug" != true; then CPPFLAGS="$CPPFLAGS -DqCvsDebug=0" CFLAGS="$CFLAGS -DqCvsDebug=0" else CPPFLAGS="$CPPFLAGS -DqCvsDebug=1" CFLAGS="$CFLAGS -DqCvsDebug=1" fi dnl Set PACKAGE_DATA_DIR in config.h. if test "x${datadir}" = 'x${prefix}/share'; then if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}") else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}") fi else AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}") fi dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}/gcvs") AC_CONFIG_SUBDIRS(cvsunix) AC_OUTPUT([ Makefile \ common/Makefile \ cvstree/Makefile \ rf/Makefile \ rf/support/Makefile \ rf/support/gtk/Makefile \ gcvs/Makefile \ gcvs/src/Makefile \ Macros/Makefile \ GuiDoc/Makefile \ ]) echo echo $PACKAGE $VERSION echo echo Using TCL .................... : $ac_has_tclinc if test $ac_has_tclinc = yes ; then echo " Version ................... : "${TCL_VERSION}${TCL_PATCH_LEVEL} echo " TCL_INCLUDE_DIR ........... : "$TCL_INCLUDE_DIR echo " TCL_LIB_DIR ............... : "$TCL_LIB_DIR else echo " Unable to find TCL, shell will be disabled" fi echo echo UI Library.................... : GTK $gtk_config_major_version.$gtk_config_minor_version echo echo Print debugging messages...... : $debug echo eval eval echo gcvs will be installed in $bindir. if test "x$gcvspath" != "x" ; then echo Warning: You have an old copy of gcvs at $gcvspath. fi echo echo configure complete, now type \'make\' echo