[PATCH]Make VFS modules work under Solaris and AIX

Juergen Hasch Hasch at t-online.de
Mon May 20 14:43:02 GMT 2002


Am Montag, 20. Mai 2002 01:18 schrieb Juergen Hasch:
> Am Montag, 20. Mai 2002 00:56 schrieb Juergen Hasch:
> > Hi,
> > attached is a patch and a few new files to make VFS modules work under
> > Solaris and AIX.
> > I have tested it with Solaris 8 using gcc and Sun Workshop cc. For AIX I
> > tested it with gcc and xlc_r. Linux still works, too :-)
> >
> > samba_core.patch changes configure.in and Makefile.in in the samba source
> > directory. The patch is needed to access symbols within smbd from a VFS
> > module.
> > The files configure.in and Makefile.in go to the examples/VFS directory.
> > After running autoconf you can execute configure to create a new Makefile
> > which will have the correct settings for Linux, AIX and Solaris.
>
> Oops, actually I only wanted to save the message to my drafts folder and
> send it after some sleep. But here is the patch anyway...
> It applies to SAMBA_2_2 CVS.

Here are the slightly updated patches for Samba HEAD.
Makefile.in.patch and configure.in.patch apply to samba/source, Makefile.in 
and configure.in go to samba/examples/VFS.

...Juergen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.in
Type: text/x-makefile
Size: 749 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020520/0605a300/Makefile.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.in.patch
Type: text/x-makefile
Size: 539 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020520/0605a300/Makefile.in.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.in.patch
Type: text/x-diff
Size: 1442 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020520/0605a300/configure.in.bin
-------------- next part --------------
dnl Samba VFS Modules

AC_INIT

uname=`uname`

# include dirs
SAMBA_SRC="../../source"
SAMBA_INCL="$SAMBA_SRC/include"
UBIQX_SRC="$SAMBA_SRC/ubiqx"
SMBWR_SRC="$SAMBA_SRC/smbwrapper"
CFLAGS="-I$SAMBA_SRC -I$SAMBA_INCL -I$UBIQX_SRC -I$SMBWR_SRC"

dnl Check programs needed
AC_PROG_CC

dnl ensure libtool is installed
AC_PATH_PROG(LIBTOOL, libtool,,)
if test "$LIBTOOL" = ""; then
        echo
        echo 'FATAL ERROR: libtool does not seem to be installed.'
        echo $pkg_name cannot be built without a working libtool installation.
        exit 1
fi

dnl check in which directory to install
AC_PREFIX_DEFAULT(/usr/local/samba)

if test "$prefix" = NONE ; then
  prefix=$ac_default_prefix
fi

AC_ARG_WITH(installdir,
[--with-installdir=DIR   Set .so install directory (default=$prefix/lib)],
    INSTALLDIR="$withval",
    INSTALLDIR="$prefix/lib")
AC_SUBST(INSTALLDIR)

AC_ARG_WITH(krb5,
[--with-krb5=DIR         Set Kerberos 5 include file directory],
    CFLAGS="$CFLAGS -I$withval",)

#
# Config CFLAGS settings
#

case "$uname" in
	AIX)
		if test "${GCC}" = "yes"; then
			CFLAGS="$CFLAGS -Wall -I/usr/include -D_LINUX_SOURCE_COMPAT"
		else
			CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
		fi
		;;
	SunOS)
		if test "${GCC}" = "yes"; then
			CFLAGS="$CFLAGS -Wall"
		else
			CFLAGS="$CFLAGS"
		fi
		;;
	Linux)
		CFLAGS="$CFLAGS -Wall"
	;;	
esac

#
# Config LDLAGS settings
#
LDFLAGS="-shared"

case "$uname" in
	AIX)
		if test "${GCC}" = "yes"; then
			LDFLAGS="-shared -s"
		else
			LDFLAGS="-Wl,-G,-bexpall,-bnoentry,-s"
		fi
		;;
	SunOS)
		LDFLAGS="-G"
		;;
esac

#################################################
# Check to see if we should use the included popt

AC_ARG_WITH(included-popt,
[  --with-included-popt    use bundled popt library, not from system],
[
  case "$withval" in
        yes)
                INCLUDED_POPT=yes
                ;;
        no)
                INCLUDED_POPT=no
                ;;
  esac ],
)
if test x"$INCLUDED_POPT" != x"yes"; then
    AC_CHECK_LIB(popt, poptGetContext,
                 INCLUDED_POPT=no, INCLUDED_POPT=yes)
fi

AC_MSG_CHECKING(whether to use included popt)
if test x"$INCLUDED_POPT" = x"yes"; then
	AC_MSG_RESULT($srcdir/popt)
	CFLAGS="$CFLAGS -I$SAMBA_SRC/popt"
else
	AC_MSG_RESULT(no)    
fi

AC_OUTPUT([Makefile])


More information about the samba-technical mailing list