1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
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
|