From 7baf3c17307c0ca5b3e959fb74a0ee7dfcd20654 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 26 Jul 2000 03:39:11 +0000 Subject: Switch Solaris package build naming to a more generic SVR4. Add RPM and SRPM package build targets. Move ethereal.spec(.in) to packaging/rpm. The spec file is different from Henri's. We might want to switch to his for the sake of consistency. svn path=/trunk/; revision=2162 --- configure.in | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 4 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 8b812dd8e4..4b330a1bf0 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.96 2000/07/22 04:09:55 gerald Exp $ +# $Id: configure.in,v 1.97 2000/07/26 03:38:27 gerald Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -33,6 +33,55 @@ AC_SUBST(PERL_PATH) AC_SUBST(FLEX_PATH) +# Check for packaging utilities +# For now, we check to see if the various packaging utilites are in our +# path. I'm too lazy to write code to go hunt for them. - Gerald +AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no") +AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no") +AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no") +AC_CHECK_PROG(HAVE_RPM, rpm, "yes", "no") + +if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \ + -a x$HAVE_PKGTRANS = xyes ; then + HAVE_SVR4_PACKAGING=yes +else + HAVE_SVR4_PACKAGING=no +fi +AC_SUBST(HAVE_SVR4_PACKAGING) + +# Grr. Rpm 2.x has a nifty "--showrc" flag that lists all of the current +# configuration values. Version 3.x took the niftiness away by returning +# the values in their raw, unexpanded, macro-embedded form. We can either +# try to expand the values we get from 3.x, or poke around for popular build +# directories. +HAVE_RPM_PACKAGING=no +if test x$HAVE_RPM = xyes ; then + AC_MSG_CHECKING(for rpm build directories) + RPM_SOURCESDIR=`rpm --showrc | grep "^sourcedir" | \ + sed -e 's/.*: //' 2> /dev/null` + if test x$RPM_SPECDIR = x ; then + # Red Hat : /usr/src/redhat + # Mandrake : /usr/scr/rpm + # SuSE : /usr/src/packages + for TEST_DIR in /usr/src/redhat /usr/src/rpm /usr/src/packages ; do + if test -d $TEST_DIR/SPECS -a -d $TEST_DIR/SOURCES -a \ + -d $TEST_DIR/RPMS -a -d $TEST_DIR/SRPMS -a \ + -d $TEST_DIR/BUILD ; then + RPM_SOURCESDIR=$TEST_DIR/SOURCES + fi + done + fi + if test x$RPM_SOURCESDIR = x ; then + AC_MSG_RESULT(not found) + RPM_SOURCESDIR="" + else + AC_MSG_RESULT(found) + HAVE_RPM_PACKAGING=yes + fi +fi +AC_SUBST(HAVE_RPM_PACKAGING) + + # If we're running gcc, add '-Wall' to CFLAGS. AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) if test x$GCC != x ; then @@ -395,13 +444,15 @@ AM_CONFIG_HEADER(config.h) AC_CONFIG_SUBDIRS(wiretap) AC_OUTPUT( Makefile - ethereal.spec doc/Makefile doc/dfilter2pod gtk/Makefile packaging/Makefile - packaging/solaris/Makefile - packaging/solaris/pkginfo + packaging/rpm/Makefile + packaging/rpm/ethereal.spec + packaging/svr4/Makefile + packaging/svr4/checkinstall + packaging/svr4/pkginfo plugins/Makefile plugins/gryphon/Makefile, [chmod +x doc/dfilter2pod]) -- cgit v1.2.3