dnl Process this file with autoconf to produce a configure script.
dnl
-dnl $Id: configure.in,v 1.68.2.1 2002/07/26 15:21:12 oes Exp $
+dnl $Id: configure.in,v 1.68.2.6 2002/09/25 15:35:15 oes Exp $
dnl
dnl Written by and Copyright (C) 2001, 2002 the SourceForge
dnl Privoxy team. http://www.privoxy.org/
dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl $Log: configure.in,v $
+dnl Revision 1.68.2.6 2002/09/25 15:35:15 oes
+dnl Marking as non-release
+dnl
+dnl Revision 1.68.2.5 2002/08/25 23:37:00 hal9
+dnl Getting ready for 3.0 release.
+dnl
+dnl Revision 1.68.2.4 2002/08/10 11:21:57 oes
+dnl - Set Version to 2.9.20 (beta)
+dnl - Add two AC_DEFINEs that indicate if the pcre*.h headers
+dnl are located in a pcre/ subdir to the include path.
+dnl
+dnl Revision 1.68.2.3 2002/08/06 11:29:36 oes
+dnl Fixed detection/inclusion of pcre.h, which is in a pcre subdir on RH
+dnl
+dnl Revision 1.68.2.2 2002/07/30 19:36:09 hal9
+dnl Bump version to 2.9.17.
+dnl
dnl Revision 1.68.2.1 2002/07/26 15:21:12 oes
dnl Bumped version number for 2.9.16 freeze
dnl
dnl AutoConf Initialization
dnl =================================================================
-AC_REVISION($Revision: 1.68.2.1 $)
+AC_REVISION($Revision: 1.68.2.6 $)
AC_INIT(jcc.c)
if test ! -f config.h.in; then
echo "You need to run autoheader first. "
echo -n "Shall I do this for you now? (y/n) "
read answer
- if test $answer != "y"; then
+ if test "$answer" != "y"; then
exit 1
else
autoheader
dnl Application version number
dnl =================================================================
-VERSION_MAJOR=2
-VERSION_MINOR=9
-VERSION_POINT=17
-CODE_STATUS="beta"
+VERSION_MAJOR=0
+VERSION_MINOR=0
+VERSION_POINT=0
+CODE_STATUS="UNRELEASED"
dnl CODE_STATUS can be "alpha", "beta", or "stable", and will be
-dnl used for CGI output
+dnl used for CGI output. Set version to 0.0.0 and status to "UNRELEASED"
+dnl whenever CVS in a stable branch differs from the last release.
dnl =================================================================
dnl Substitute the version numbers
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+AC_PROG_AWK
AC_CHECK_PROG(GDB,gdb,yes,no)
+AC_PATH_PROG(BGROUPS,groups,no,/bin:/usr/bin:/usr/local/bin)
+AC_PATH_PROG(ID,id,no,/bin:/usr/bin:/usr/local/bin)
+AC_SUBST(ID)
+AC_SUBST(BGROUPS)
dnl =================================================================
dnl debug, gcc and gdb support
]
)
+dnl =================================================================
+dnl Check for user and group validity
+dnl =================================================================
+
+$ID privoxy >/dev/null 2>/dev/null
+if test $? -ne 0 ; then
+ AC_MSG_WARN(There is no user 'privoxy' on this system)
+fi
+AC_MSG_CHECKING([for user])
AC_ARG_WITH(user,
- [ --with-user=privoxy Set user under which privoxy run],
+ [ --with-user=privoxy Set user under which privoxy will run],
[
if test "x$withval" != "xyes"; then
- USER=$with_user;
+ if test $ID = no ; then
+ AC_MSG_ERROR(There is no 'id' program on this system)
+ else
+ AC_MSG_RESULT($with_user)
+ $ID $with_user 2>/dev/null >/dev/null
+ if test $? -eq 0 ; then
+ USER=$with_user;
+ else
+ AC_MSG_ERROR(There is no user '$with_user' on this system)
+ fi
+ fi
else
AC_MSG_ERROR(We need a user if you give me this parameter)
fi
],
[
- USER=privoxy;
+ if test $ID = no ; then
+ AC_MSG_ERROR(There is no 'id' programm on this system)
+ else
+ AC_MSG_RESULT(none specified)
+ USER=$with_user
+ fi
]
)
AC_SUBST(USER)
+AC_MSG_CHECKING([for group])
AC_ARG_WITH(group,
[ --with-group=privoxy Set group for privoxy],
- [
+ [
if test "x$withval" != "xyes"; then
- GROUP=$with_group;
+ if test $BGROUPS = no ; then
+ AC_MSG_ERROR(There is no 'groups' program on this system)
else
+ AC_MSG_RESULT($with_group)
+ $BGROUPS $USER >/dev/null
+ if test $? -eq 0 ; then
+ # FIXME: this fails if valid group, but not first group
+ # listed.
+ if test "$with_group" != "`$BGROUPS $USER | sed 's/.*: //' 2>/dev/null |$AWK '{print $1}'`" ; then
+ AC_MSG_ERROR(The given value '$withval' does not match group entry)
+ else
+ GROUP=$with_group;
+ fi
+ else
+ AC_MSG_ERROR(There is no group entry for user '$USER')
+ fi
+ fi
+ else
AC_MSG_ERROR(We need a group if you give me this parameter)
fi
],
[
- GROUP=privoxy;
+ if test $BGROUPS = no ; then
+ AC_MSG_ERROR(There is no 'groups' programm on this system)
+ else
+ AC_MSG_RESULT(none specified)
+ GROUP=$with_group;
+ fi
]
)
AC_SUBST(GROUP)
+
dnl =================================================================
dnl additional gcc flags
dnl =================================================================
if test $dodk != no; then
AC_CHECK_PROGS(WDUMP,w3m lynx links,false)
if test "$WDUMP" = false; then
- AC_MSG_ERROR(You need some kind of text browser to continue \(w3m, lynx and links are supported\))
+ AC_MSG_WARN(You need some kind of text browser to build documentation \(w3m, lynx and links are supported\))
fi
if test $DB2HTML = false; then
dnl We need to clean the variable, otherwise AC_CHECK_PROGS
if test $dodk = yes; then
if test $DKPREFIX = none; then
for i in /usr/share/sgml/docbook/dsssl-stylesheets /usr/share/sgml/docbkdsl /usr/share/sgml/docbook-dsssl; do
- echo -n "checking for $i/html/docbook.dsl..."
+dnl echo -n does not fly with /bin/sh.
+dnl echo -n "checking for $i/html/docbook.dsl..."
+ AC_MSG_CHECKING([for $i])
if test -f $i/html/docbook.dsl; then
echo "yes"
DKPREFIX=$i
done
# where are the catalogs?
for i in /usr/share/sgml/CATALOG.docbk30 /usr/share/sgml/CATALOG.docbk31; do
- echo -n "checking for $i..."
+dnl echo -n "checking for $i..."
+ AC_MSG_CHECKING([for $i])
if test -f $i; then
echo "yes"
JADECAT="$JADECAT -c $i"
dnl Note: Some systems may have the library but not the system header
dnl file, so we must check for both.
dnl Also check for correct version
-AC_CHECK_LIB(pcre, pcre_compile, [AC_CHECK_HEADER(pcre.h, [AC_EGREP_HEADER(pcre_fullinfo, pcre.h, [have_pcre=yes], [AC_MSG_WARN([[pcre old version installed]]); have_pcre=no])], [have_pcre=no])], [have_pcre=no])
-AC_CHECK_LIB(pcreposix, regcomp, [AC_CHECK_HEADER(pcreposix.h, [AC_EGREP_HEADER(pcreposix_regerror, pcreposix.h, [AC_MSG_WARN([[pcreposix old version installed]]); have_pcreposix=no], [have_pcreposix=yes])], [have_pcreposix=no])], [have_pcreposix=no], -lpcre)
-AC_CHECK_LIB(pcrs, pcrs_compile, [AC_CHECK_HEADER(pcrs.h, [have_pcrs=yes], [have_pcrs=no])], [have_pcrs=no])
-
+AC_CHECK_LIB(pcre, pcre_compile, [
+ AC_CHECK_HEADER(pcre.h, [
+ AC_EGREP_HEADER(pcre_fullinfo, pcre.h, [have_pcre=yes], [AC_MSG_WARN([[pcre old version installed]]); have_pcre=no])
+ ], [
+ AC_CHECK_HEADER(pcre/pcre.h, [
+ AC_EGREP_HEADER(pcre_fullinfo, pcre/pcre.h, [have_pcre=yes]; [AC_DEFINE(PCRE_H_IN_SUBDIR)], [AC_MSG_WARN([[pcre old version installed]]); have_pcre=no])
+ ], [have_pcre=no])
+ ])
+], [have_pcre=no])
+
+AC_CHECK_LIB(pcreposix, regcomp, [
+ AC_CHECK_HEADER(pcreposix.h, [
+ AC_EGREP_HEADER(pcreposix_regerror, pcreposix.h, [AC_MSG_WARN([[pcreposix old version installed]]); have_pcreposix=no], [have_pcreposix=yes])
+ ], [
+ AC_CHECK_HEADER(pcre/pcreposix.h, [
+ AC_EGREP_HEADER(pcreposix_regerror, pcre/pcreposix.h, [AC_MSG_WARN([[pcreposix old version installed]]); have_pcreposix=no], [have_pcreposix=yes]; [AC_DEFINE(PCREPOSIX_H_IN_SUBDIR)])
+ ], [have_pcreposix=no])
+ ])
+], [have_pcreposix=no], -lpcre)
+
+AC_CHECK_LIB(pcrs, pcrs_compile, [AC_CHECK_HEADER(pcrs.h, [have_pcrs=yes], [have_pcrs=no])], [have_pcrs=no], -lpcre)
dnl =================================================================
dnl Always defined