[PATCH]Make VFS modules work under Solaris and AIX

Juergen Hasch Hasch at t-online.de
Sun May 19 16:22:02 GMT 2002


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...
I applies to SAMBA_2_2 CVS.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba_core.patch
Type: text/x-diff
Size: 2274 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020519/06e310fc/samba_core.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.in
Type: text/x-makefile
Size: 594 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020519/06e310fc/Makefile.bin
-------------- next part --------------
dnl Samba VFS Modules

AC_INIT

uname=`uname`

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

#
# Config CFLAGS settings
#
CFLAGS="-Wall"

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

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

case "$uname" in
	AIX)
		LDFLAGS="-Wl,-G,-bexpall,-bnoentry"
		;;
	SunOS)
		LDFLAGS="-G"
		;;
#	Linux)
#		echo "Linux found"
#		LDFLAGS="-shared"
#		;;
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../../source/popt"
else
	AC_MSG_RESULT(no)    
fi

CFLAGS="$CFLAGS -I../../source -I../../source/include -I../../source/ubiqx -I../../source/smbwrapper"

AC_OUTPUT([Makefile])


More information about the samba-technical mailing list