CVS: is/fs25 configure.ac,NONE,1.1 Makefile.am,1.1,1.2

Andres Salomon <[email protected]> Wed, 04 Dec 2002 21:11:43 -0800
Newsgroups gmane.comp.file-systems.intermezzo.cvs
Message-ID <[email protected]>
Update of /cvsroot/intermezzo/is/fs25
In directory sc8-pr-cvs1:/tmp/cvs-serv26440/fs25

Modified Files:
	Makefile.am 
Added Files:
	configure.ac 
Log Message:
I'm not sure why .ac's were removed (perhaps not enough people using
autoconf2.50 at the time?), but I'm moving it back.  Also, one of the great
annoyances I've had w/ the autoconf script has been having to supply
--with-linuxdir; this is now optional, and doesn't default to /usr/src/linux
(since 2.4.19, the kernel now untars to linux-$VERSION, so this is a
less-suitable default).



--- NEW FILE ---
AC_INIT
# Copyright (C) 2001, 2002 Cluster File Systems, Inc.
#
# This code is issued under the GNU General Public License.
# See the file COPYING in this distribution

# Automake variables.  Steal the version number from packaging/intersync.spec
AM_INIT_AUTOMAKE(intersync, builtin([esyscmd], [sed -ne '/^Version: /{ s/.*: //; p; q; }' ../packaging/intersync.spec]))
#AM_MAINTAINER_MODE

AC_PROG_CC
AC_PROG_RANLIB

AC_PREFIX_DEFAULT([])
if test "x$prefix" = xNONE || test "x$prefix" = x; then
  usrprefix=/usr
else
  usrprefix='${prefix}'
fi
AC_SUBST(usrprefix)

oldincludedir='${usrprefix}/include'

linuxdir_def=/usr/src/linux
AC_ARG_WITH(linux, [  --with-linux=[path] set path to Linux source (default=/usr/src/linux)], enable_linuxdir=$withval)
AC_ARG_ENABLE(linuxdir, [  --enable-linuxdir=[path] (deprecated) set path to Linux source (default=/usr/src/linux)],, enable_linuxdir=$linuxdir_def)

LINUX=$enable_linuxdir
AC_SUBST(LINUX)

AC_MSG_CHECKING(if make dep has been run in kernel source)
if test -f $LINUX/include/linux/config.h ; then
	AC_MSG_RESULT(yes)
else
	AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.)
fi

AC_MSG_CHECKING(if autoconf.h is in kernel source)
if test -f $LINUX/include/linux/autoconf.h ; then
	AC_MSG_RESULT(yes)
else
	AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.)
fi

AC_MSG_CHECKING(if you are compiling for user mode linux)
um_asm_link=`ls -l "$LINUX/include/asm" | sed -e "s%.* $LINUX/include/asm -> %%"`
if test "X$um_asm_link" = Xasm-um; then
        AC_MSG_RESULT(yes)
        KCFLAGS='-Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common -g '
        KCPPFLAGS='-D__KERNEL__ -DMODULE -I$(srcdir) -I$(LINUX)/include -I$(top_srcdir)/include  -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE -I$(LINUX)/arch/um/include -Derrno=kernel_errno'
else
        AC_MSG_RESULT(no)
        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -pipe'
        KCPPFLAGS='-D__KERNEL__ -DMODULE -I$(srcdir) -I$(LINUX)/include -I$(top_srcdir)/include'
fi

AC_MSG_CHECKING(for MODVERSIONS)
if egrep -e 'MODVERSIONS.*1' $LINUX/include/linux/autoconf.h >/dev/null 2>&1;
then
	MFLAGS="-DMODVERSIONS -include $LINUX/include/linux/modversions.h"
	AC_MSG_RESULT(yes)
else
	MFLAGS=
	AC_MSG_RESULT(no)
fi

AC_MSG_CHECKING(for SMP)
if egrep -e SMP=y $LINUX/.config >/dev/null 2>&1; then
	SMPFLAG=-D__SMP__
	AC_MSG_RESULT(yes)
else
	SMPFLAG=
	AC_MSG_RESULT(no)
fi

CFLAGS="$KCFLAGS"
CPPFLAGS="$MFLAGS $SMPFLAG $KCPPFLAGS"

AC_MSG_CHECKING(for Linux release)

dnl We need to rid ourselves of the nasty [ ] quotes.
changequote(,)
RELEASE=`sed -ne '/^#define  *UTS_RELEASE  *"/{ s/.*"\([^"]*\)".*/\1/; p; q; }' $LINUX/include/linux/version.h`
changequote([,])

moduledir='${prefix}/lib/modules/'$RELEASE
AC_SUBST(moduledir)
modulefsdir='${moduledir}/kernel/fs/intermezzo'
AC_SUBST(modulefsdir)

AC_MSG_RESULT($RELEASE)
AC_SUBST(RELEASE)

# Directories for documentation and demos.
docdir='${datadir}/doc/$(PACKAGE)'
AC_SUBST(docdir)

demodir='$(docdir)/demo'
AC_SUBST(demodir)

AC_OUTPUT(Makefile linux/Makefile)

Index: Makefile.am
===================================================================
RCS file: /cvsroot/intermezzo/is/fs25/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- Makefile.am	11 Oct 2002 22:52:01 -0000	1.1
+++ Makefile.am	5 Dec 2002 05:11:40 -0000	1.2
@@ -8,5 +8,4 @@
 SUBDIRS = linux
 
-VERSION:=@IVERSION@
 DEFS:=
 



-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en