[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] RH 6.0 ./configure help !!



Mark Brown wrote:

> On Sat, Jun 19, 1999 at 04:05:42AM -0700, Mike A. Lewis, CNE wrote:
> > Moving leafnode-1.10b2 from RH5.2 to RH 6.0 and I get errors when I do
> > /configure.  What am I missing here ?
> 
> The new version of RPM in RH6.0 outputs information differently,
> breaking the RPM detection in configure.  Unless you're planning on
> building an RPM, you can just comment out the relevant section of
> configure and re-run it.

If somebody out there has autoconf installed and is willing to give it
a try, I would appreciate a test of the following configure.in instead
of the old one. It has a different approach of detecting RPM configuration
paths.

---cut here---
dnl autoconf script for leafnode
dnl written by Cornelius Krasel, 1999
dnl Process this file with autoconf to produce a configure script.
AC_INIT(leafnode.h)
AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_CHECK_PROG( AR, ar, ar )
AC_PATH_PROG( RPM, rpm )
AC_PATH_PROG( GZIP, gzip )
AC_PATH_PROG( FLEX, flex )
if [ ! test -x "$FLEX" ] ; then
  AC_PATH_PROG( FLEX, lex )
fi
AC_PATH_PROG( AUTOCONF, autoconf )

dnl rpm stuff
if test -x "$RPM" ; then
 AC_MSG_CHECKING(paths for rpm)
 RPMSOURCEDIR=`$RPM --showrc | grep ^sourcedir | $AWK '{ printf("%s",$3); }'`
 SPECDIR=`$RPM --showrc | grep ^specdir | $AWK '{ printf("%s",$3); }'`
 BUILDDIR=`$RPM --showrc | grep ^builddir | $AWK '{ printf("%s",$3); }'`
 RPMCMD="@./makerpm.sh ${RPM} ${SPECDIR}"'/leafnode-$(VERSION).spec'" ${RPMSOURCEDIR}"'/leafnode-$(VERSION).filelist'" ${BUILDDIR} "'$(VERSION) $(USRDIR) $(BINDIR) $(MANDIR) $(LOCKFILE) $(SPOOLDIR) $(LIBDIR)'
 AC_MSG_RESULT(done)
else
 RPMCMD="@echo Unable to locate rpm"
 AC_MSG_RESULT(failed)
fi
AC_SUBST(RPMCMD)

dnl flex stuff
AC_MSG_CHECKING(flex)
if test -x "$FLEX" ; then
 FILTERUTILSRC='filterutil.l'
 FILTERUTILPROD='filterutil.o:	'"${FILTERUTILSRC}"' leafnode.h'
 FILTERUTILCMD1='	$(FLEX) -is -ofilterutil.c '"${FILTERUTILSRC}"
 FILTERUTILCMD2='	$(CC) -c $(CFLAGS) filterutil.c'
 AC_MSG_RESULT(done)
else
 FILTERUTILSRC='filterutil.c'
 FILTERUTILPROD='filterutil.o:	'"${FILTERUTILSRC}"' leafnode.h'
 FILTERUTILCMD1='	$(CC) -c $(CFLAGS) '"${FILTERUTILSRC}"
 FILTERUTILCMD2=''
 AC_MSG_RESULT(no)
fi
AC_SUBST(FILTERUTILSRC)
AC_SUBST(FILTERUTILPROD)
AC_SUBST(FILTERUTILCMD1)
AC_SUBST(FILTERUTILCMD2)

dnl Checks for libraries.
dnl Replace `main' with a function in -llnutil:
dnl AC_CHECK_LIB(main)

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h fcntl.h fnmatch.h getopt.h limits.h sys/time.h syslog.h unistd.h ap_config.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(fnmatch getcwd gethostname mkdir mktime regcomp rmdir socket strdup strerror strstr strtol strtoul)

# Whenever both -lsocket and -lnsl are needed, it seems to be always the
# case that gethostbyname requires -lnsl.  So, check -lnsl first, for it
# to be in LIBS before the setsockopt checks are performed.  *However*,
# on SINIX-N 5.43, this is false, and gethostent seems to be a better
# candidate. So, let's use it below instead of gethostbyname, and see.
# Stolen from GNU tar 1.12

AC_CHECK_FUNC(gethostent)
if test $ac_cv_func_gethostent = no; then
  AC_CHECK_LIB(nsl, gethostent)
fi
AC_CHECK_FUNC(setsockopt)
if test $ac_cv_func_setsockopt = no; then
  AC_CHECK_LIB(socket, setsockopt)
fi

AC_OUTPUT(Makefile)
---cut here---

Thanks,

--Cornelius.

-- 
/* Cornelius Krasel, U Wuerzburg, Dept. of Pharmacology, Versbacher Str. 9 */
/* D-97078 Wuerzburg, Germany   email: phak004@xxxxxxxxxxxxxxxxxxxxxx  SP4 */
/* "Science is the game we play with God to find out what His rules are."  */

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list