Commit ddafe26c authored by Kevin Cozens's avatar Kevin Cozens

Initial revision

parents
Makefile.in
Makefile
aclocal.m4
autom4te.cache
configure
config.cache
config.h
config.h.in
config.log
config.status
config.guess
config.sub
intltool-extract
intltool-extract.in
intltool-merge
intltool-merge.in
intltool-update
intltool-update.in
libtool
ltmain.sh
mkinstalldirs
stamp-h1
Name: Scott Lembcke
Email: lemb0029@morris.umn.edu
url:
ircnick: lembcke
expertise: Ruby
current work:
commit access: yes
Name: Kevin Cozens
Email: kcozens@cvs.gnome.org
url: http://www.interlog.com/~kcozens/software/gimp/tiny-fu.html
ircnick: Kevin
expertise: TinyScheme, Scheme, GIMP Scripting, and many other things.
current work: Tiny-Fu, and mentoring Scott in Google's Summer of Code 2006
commit access: yes
## Process this file with automake to produce Makefile.in
SUBDIRS = \
ext \
gimp-lib \
plug-ins
# po
if PLATFORM_WIN32
no_undefined = -no-undefined
path_separator = ;
else
path_separator = :
endif
rubybase = ruby
rubydir = $(GIMP_LIBDIR)/$(rubybase)
rubyenvdir = $(GIMP_LIBDIR)/environ
rubyinterpdir = $(GIMP_LIBDIR)/interpreters
rubyenvfile = $(rubyenvdir)/ruby.env
rubyinterpfile = $(rubyinterpdir)/ruby.interp
install-env-file:
$(mkinstalldirs) '$(DESTDIR)$(rubyenvdir)'
echo '$(path_separator) RUBYLIB=$${gimp_plug_in_dir}/ruby' > '$(DESTDIR)$(rubyenvfile)'
install-interp-file:
$(mkinstalldirs) '$(DESTDIR)$(rubyinterpdir)'
echo 'ruby=$(RUBY_BIN)' > '$(DESTDIR)$(rubyinterpfile)'
echo '/usr/bin/ruby=$(RUBY_BIN)' >> '$(DESTDIR)$(rubyinterpfile)'
echo ':Ruby:E::rb::ruby:' >> '$(DESTDIR)$(rubyinterpfile)'
install-data-local: install-env-file install-interp-file
uninstall-local:
rm -f '$(DESTDIR)$(rubyenvfile)' '$(DESTDIR)$(rubyinterpfile)'
EXTRA_DIST = \
AUTHORS \
ChangeLog \
COPYING \
MAINTAINERS \
NEWS \
README \
autogen.sh \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
enumconvert.rb \
notes.rtf \
todo.txt
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
gimp-ruby
---------
This is a Ruby based scripting plug-in for the GNU Image Manipulation
Program. It was created by Scott Lembcke as one of the projects accepted
in the Google Summer of Code program for 2006. The project was mentored
by Kevin Cozens.
# Configure check for Ruby
# Kenta MURATA <muraken2 / nifty.com>
# Modifications in June, 2006 by Kevin Cozens <kcozens@interlog.com>
dnl AM_CHECK_RUBY([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for Ruby, and define RUBY_CFLAGS, RUBY_LIBS, RUBY_LDSHARED, RUBY_DLEXT,
dnl ruby_libdir, ruby_archdir, ruby_sitelibdir and ruby_sitearchdir
dnl
AC_DEFUN(AM_CHECK_RUBY,
[dnl
dnl Get the cflags and libraries from the rbconfig.rb
dnl
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
AC_PATH_PROG(RUBY, ruby, no)
if test "$RUBY" = "no"; then
AC_MSG_ERROR([*** Could not find Ruby interpreter.])
fi
RUBY_BIN="$RUBY"
minimum_version=ifelse([$1], ,1.4.4, $1)
AC_MSG_CHECKING([for Ruby - version >= $minimum_version])
ruby_major_version=`$RUBY -e "print RUBY_VERSION.split('.')[[0]]"`
ruby_minor_version=`$RUBY -e "print RUBY_VERSION.split('.')[[1]]"`
ruby_micro_version=`$RUBY -e "print RUBY_VERSION.split('.')[[2]]"`
if `$RUBY -e "
major_version = RUBY_VERSION.split('.')[[0]].to_i
minor_version = RUBY_VERSION.split('.')[[1]].to_i
micro_version = RUBY_VERSION.split('.')[[2]].to_i
min_major_version = '$minimum_version'.split('.')[[0]].to_i
min_minor_version = '$minimum_version'.split('.')[[1]].to_i
min_micro_version = '$minimum_version'.split('.')[[2]].to_i
if ((major_version > min_major_version) ||
((major_version == min_major_version) &&
(minor_version > min_minor_version)) ||
((major_version == min_major_version) &&
(minor_version == min_minor_version) &&
(micro_version >= min_micro_version))) then
exit 1
end
exit 0"`; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([*** Ruby version is too old.])
fi
AC_MSG_RESULT([yes])
ruby_libdir=`$RUBY -r rbconfig -e "puts Config::CONFIG[['rubylibdir']]"`
ruby_archdir=`$RUBY -r rbconfig -e "puts Config::CONFIG[['archdir']]"`
ruby_sitelibdir=`$RUBY -r rbconfig -e "puts Config::CONFIG[['sitelibdir']]"`
ruby_sitearchdir=`$RUBY -r rbconfig -e "puts Config::CONFIG[['sitearchdir']]"`
AC_CHECK_HEADER($ruby_archdir/ruby.h,,
AC_MSG_ERROR([*** Can't find Ruby header files. Please install them.]))
CFLAGS=`$RUBY -r rbconfig -e "puts Config::CONFIG[['CCDLFLAGS']]"`
RUBY_CFLAGS="$RUBY_CFLAGS $CFLAGS"
CFLAGS=`$RUBY -r rbconfig -e "puts Config::CONFIG[['CFLAGS']]"`
RUBY_CFLAGS="$RUBY_CFLAGS $CFLAGS -I\$(ruby_archdir)";
RUBY_LDSHARED=`$RUBY -r rbconfig -e "puts Config::CONFIG[['LDSHARED']]"`
LIBS=`$RUBY -r rbconfig -e "puts Config::CONFIG[['LDFLAGS']]"`
RUBY_LIBS="$RUBY_LIBS $LIBS"
LIBS=`$RUBY -r rbconfig -e "puts Config::CONFIG[['DLDFLAGS']]"`
RUBY_LIBS="$RUBY_LIBS $LIBS"
RUBY_DLEXT=`$RUBY -r rbconfig -e "puts Config::CONFIG[['DLEXT']]"`
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
AC_SUBST(RUBY_BIN)
AC_SUBST(RUBY_CFLAGS)
AC_SUBST(RUBY_LIBS)
AC_SUBST(RUBY_DLEXT)
AC_SUBST(RUBY_LDSHARED)
AC_SUBST(ruby_libdir)
AC_SUBST(ruby_archdir)
AC_SUBST(ruby_sitelibdir)
AC_SUBST(ruby_sitearchdir)
])
#!/bin/sh
# This script does all the magic calls to automake/autoconf and
# friends that are needed to configure a cvs checkout. As described in
# the file HACKING you need a couple of extra tools to run this script
# successfully.
#
# If you are compiling from a released tarball you don't need these
# tools and you shouldn't use this script. Just call ./configure
# directly.
ACLOCAL=${ACLOCAL-aclocal-1.9}
AUTOCONF=${AUTOCONF-autoconf}
AUTOHEADER=${AUTOHEADER-autoheader}
AUTOMAKE=${AUTOMAKE-automake-1.9}
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
AUTOCONF_REQUIRED_VERSION=2.54
AUTOMAKE_REQUIRED_VERSION=1.8.3
GLIB_REQUIRED_VERSION=2.2.0
INTLTOOL_REQUIRED_VERSION=0.31
LIBTOOL_REQUIRED_VERSION=1.4
LIBTOOL_WIN32=1.5
PROJECT="RuG"
TEST_TYPE=-d
FILE=plug-ins
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
check_version ()
{
VERSION_A=$1
VERSION_B=$2
save_ifs="$IFS"
IFS=.
set dummy $VERSION_A 0 0 0
MAJOR_A=$2
MINOR_A=$3
MICRO_A=$4
set dummy $VERSION_B 0 0 0
MAJOR_B=$2
MINOR_B=$3
MICRO_B=$4
IFS="$save_ifs"
if expr "$MAJOR_A" = "$MAJOR_B" > /dev/null; then
if expr "$MINOR_A" \> "$MINOR_B" > /dev/null; then
echo "yes (version $VERSION_A)"
elif expr "$MINOR_A" = "$MINOR_B" > /dev/null; then
if expr "$MICRO_A" \>= "$MICRO_B" > /dev/null; then
echo "yes (version $VERSION_A)"
else
echo "Too old (version $VERSION_A)"
DIE=1
fi
else
echo "Too old (version $VERSION_A)"
DIE=1
fi
elif expr "$MAJOR_A" \> "$MAJOR_B" > /dev/null; then
echo "Major version might be too new ($VERSION_A)"
else
echo "Too old (version $VERSION_A)"
DIE=1
fi
}
echo
echo "I am testing that you have the tools required to build the"
echo "$PROJECT from CVS. This test is not foolproof,"
echo "so if anything goes wrong, see the file HACKING for more information..."
echo
DIE=0
OS=`uname -s`
case $OS in
*YGWIN* | *INGW*)
echo "Looks like Win32, you will need libtool $LIBTOOL_WIN32 or newer."
echo
LIBTOOL_REQUIRED_VERSION=$LIBTOOL_WIN32
;;
esac
echo -n "checking for libtool >= $LIBTOOL_REQUIRED_VERSION ... "
if ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then
LIBTOOLIZE=$LIBTOOLIZE
elif (glibtoolize --version) < /dev/null > /dev/null 2>&1; then
LIBTOOLIZE=glibtoolize
else
echo
echo " You must have libtool installed to compile $PROJECT."
echo " Install the appropriate package for your distribution,"
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
echo
DIE=1
fi
if test x$LIBTOOLIZE != x; then
VER=`$LIBTOOLIZE --version \
| grep libtool | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $LIBTOOL_REQUIRED_VERSION
fi
# check if gtk-doc is explicitely disabled
for ag_option in $AUTOGEN_CONFIGURE_ARGS $@
do
case $ag_option in
-disable-gtk-doc | --disable-gtk-doc)
enable_gtk_doc=no
;;
esac
done
if test x$enable_gtk_doc = xno; then
echo "skipping test for gtkdocize"
else
echo -n "checking for gtkdocize ... "
if (gtkdocize --version) < /dev/null > /dev/null 2>&1; then
echo "yes"
else
echo
echo " You must have gtk-doc installed to compile $PROJECT."
echo " Install the appropriate package for your distribution,"
echo " or get the source tarball at"
echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
echo " You can also use the option --disable-gtk-doc to skip"
echo " this test but then you will not be able to generate a"
echo " configure script that can build the API documentation."
DIE=1
fi
fi
echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
if ($AUTOCONF --version) < /dev/null > /dev/null 2>&1; then
VER=`$AUTOCONF --version | head -n 1 \
| grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOCONF_REQUIRED_VERSION
else
echo
echo " You must have autoconf installed to compile $PROJECT."
echo " Download the appropriate package for your distribution,"
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
echo
DIE=1;
fi
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
if ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=$AUTOMAKE
ACLOCAL=$ACLOCAL
elif (automake-1.9 --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.9
ACLOCAL=aclocal-1.9
elif (automake-1.8 --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.8
ACLOCAL=aclocal-1.8
else
echo
echo " You must have automake $AUTOMAKE_REQUIRED_VERSION or newer installed to compile $PROJECT."
echo " Download the appropriate package for your distribution,"
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
echo
DIE=1
fi
if test x$AUTOMAKE != x; then
VER=`$AUTOMAKE --version \
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOMAKE_REQUIRED_VERSION
fi
echo -n "checking for glib-gettextize ... "
if (glib-gettextize --version) < /dev/null > /dev/null 2>&1; then
VER=`glib-gettextize --version \
| grep glib-gettextize | sed "s/.* \([0-9.]*\)/\1/"`
check_version $VER $GLIB_REQUIRED_VERSION
else
echo
echo " You must have glib-gettextize installed to compile $PROJECT."
echo " glib-gettextize is part of glib-2.0, so you should already"
echo " have it. Make sure it is in your PATH."
echo
DIE=1
fi
echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... "
if (intltoolize --version) < /dev/null > /dev/null 2>&1; then
VER=`intltoolize --version \
| grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
check_version $VER $INTLTOOL_REQUIRED_VERSION
else
echo
echo " You must have intltool installed to compile $PROJECT."
echo " Get the latest version from"
echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/"
echo
DIE=1
fi
echo -n "checking for xsltproc ... "
if (xsltproc --version) < /dev/null > /dev/null 2>&1; then
echo "yes"
else
echo
echo " You must have xsltproc installed to compile $PROJECT."
echo " Get the latest version from"
echo " ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/"
echo
DIE=1
fi
if test "$DIE" -eq 1; then
echo
echo "Please install/upgrade the missing tools and call me again."
echo
exit 1
fi
test $TEST_TYPE $FILE || {
echo
echo "You must run this script in the top-level $PROJECT directory."
echo
exit 1
}
echo
echo "I am going to run ./configure with the following arguments:"
echo
echo " --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS $@"
echo
if test -z "$*"; then
echo "If you wish to pass additional arguments, please specify them "
echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
echo "environment variable."
echo
fi
if test -z "$ACLOCAL_FLAGS"; then
acdir=`$ACLOCAL --print-ac-dir`
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
for file in $m4list
do
if [ ! -f "$acdir/$file" ]; then
echo
echo "WARNING: aclocal's directory is $acdir, but..."
echo " no file $acdir/$file"
echo " You may see fatal macro warnings below."
echo " If these files are installed in /some/dir, set the "
echo " ACLOCAL_FLAGS environment variable to \"-I /some/dir\""
echo " or install $acdir/$file."
echo
fi
done
fi
rm -rf autom4te.cache
$ACLOCAL $ACLOCAL_FLAGS
RC=$?
if test $RC -ne 0; then
echo "$ACLOCAL gave errors. Please fix the error conditions and try again."
exit $RC
fi
$LIBTOOLIZE --force || exit $?
if test x$enable_gtk_doc = xno; then
if test -f gtk-doc.make; then :; else
echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
fi
echo "WARNING: You have disabled gtk-doc."
echo " As a result, you will not be able to generate the API"
echo " documentation and 'make dist' will not work."
echo
else
gtkdocize || exit $?
fi
# optionally feature autoheader
($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 && $AUTOHEADER || exit 1
$AUTOMAKE --add-missing || exit $?
$AUTOCONF || exit $?
glib-gettextize --force || exit $?
intltoolize --force --automake || exit $?
cd $ORIGDIR
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@"
RC=$?
if test $RC -ne 0; then
echo
echo "Configure failed or did not finish!"
exit $RC
fi
echo
echo "Now type 'make' to compile the $PROJECT."
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.54)
dnl Name your plug-in here
m4_define([plugin_name], [gimp-ruby])
dnl These three define the plug-in version number
m4_define([plugin_major_version], [0])
m4_define([plugin_minor_version], [0])
m4_define([plugin_micro_version], [3])
m4_define([plugin_version],
[plugin_major_version.plugin_minor_version.plugin_micro_version])
dnl required versions of other packages
m4_define([glib_required_version], [2.4.5])
m4_define([gtk_required_version], [2.4.4])
m4_define([gimp_required_version], [2.2.0])
AC_INIT([plugin_name], [plugin_version])
AC_DEFINE(PLUGIN_NAME, PACKAGE_NAME, [Plug-In name])
AC_DEFINE(PLUGIN_VERSION, PACKAGE_VERSION, [Plug-In version])
AC_DEFINE(PLUGIN_MAJOR_VERSION, plugin_major_version, [Plug-In major version])
AC_DEFINE(PLUGIN_MINOR_VERSION, plugin_minor_version, [Plug-In minor version])
AC_DEFINE(PLUGIN_MICRO_VERSION, plugin_micro_version, [Plug-In micro version])
AC_CONFIG_SRCDIR([ext/rbgimp.h])
AM_INIT_AUTOMAKE(no-define)
AM_CONFIG_HEADER(config.h)
RUBYGIMP_UNSTABLE=rubygimp_unstable
AC_SUBST(RUBYGIMP_UNSTABLE)
dnl The symbol RUBYGIMP_UNSTABLE is defined above for substitution in
dnl Makefiles and conditionally defined here as a preprocessor symbol
dnl and automake conditional.
if test "x$RUBYGIMP_UNSTABLE" = "xyes"; then
AC_DEFINE(RUBYGIMP_UNSTABLE,1,
[Define to 1 if this is an unstable version of RuG])
fi
AM_CONDITIONAL(RUBYGIMP_UNSTABLE, test "x$RUBYGIMP_UNSTABLE" = "xyes")
GLIB_REQUIRED_VERSION=glib_required_version
GTK_REQUIRED_VERSION=gtk_required_version
GTKDOC_REQUIRED_VERSION=gtkdoc_required_version
AC_SUBST(GLIB_REQUIRED_VERSION)
AC_SUBST(GTK_REQUIRED_VERSION)
AC_SUBST(GTKDOC_REQUIRED_VERSION)
dnl i18n stuff
GETTEXT_PACKAGE=plugin_name
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The gettext translation domain.])
dnl Initialize libtool
AC_PROG_CC
AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AM_PROG_AS
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
###########################
# Check target architecture
###########################
AC_MSG_CHECKING([for target architecture])
case x"$target" in
xNONE | x)
target_or_host="$host" ;;
*)
target_or_host="$target" ;;
esac
AC_MSG_RESULT([$target_or_host])
case "$target_or_host" in
i*86-*-*)
have_x86=yes
AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
;;
x86_64-*-*)
have_x86=yes
AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
AC_DEFINE(ARCH_X86_64, 1, [Define to 1 if you are compiling for amd64.])
;;
ppc-*-* | powerpc-*)
have_ppc=yes
AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
;;
ppc64-*-* | powerpc64-*)
have_ppc=yes
AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
AC_DEFINE(ARCH_PPC64, 1, [Define to 1 if you are compiling for PowerPC64.])
;;
*)
;;
esac
#################
# Check for Win32
#################
AC_MSG_CHECKING([for some Win32 platform])
case "$target_or_host" in
*-*-mingw* | *-*-cygwin*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
AC_MSG_CHECKING([for native Win32])
case "$target_or_host" in
*-*-mingw*)
os_win32=yes
PATHSEP=';'
;;
*)
os_win32=no
PATHSEP=':'
;;
esac
AC_MSG_RESULT([$os_win32])
AC_SUBST(PATHSEP)
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
if test "$os_win32" = "yes"; then
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
AC_CHECK_TOOL(WINDRES, windres, :)
else
WINDRES=":"
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
AC_SUBST(WINDRES)
###############
# Generic stuff
###############
dnl Checks for programs.
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Large file support for the swap file
AC_SYS_LARGEFILE
AC_MSG_CHECKING([whether to turn on debugging])
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging (default=no)],
if eval "test x$enable_debug = xyes"; then
DEBUGFLAG="-g"
fi)
if test -n "$DEBUGFLAG"; then
AC_MSG_RESULT([yes])
CFLAGS="$DEBUGFLAG $CFLAGS"
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([whether to turn on profiling])
AC_ARG_ENABLE(profile,
[ --enable-profile turn on profiling (default=no)],
if eval "test x$enable_profile = xyes"; then
PROFFLAG="-pg"
fi)
if test -n "$PROFFLAG"; then
AC_MSG_RESULT([yes])
CFLAGS="$PROFFLAG $CFLAGS"
else
AC_MSG_RESULT([no])
fi
AC_ARG_ENABLE(ansi,
[ --enable-ansi turn on strict ansi (default=no)],,
enable_ansi=no)
changequote(,)dnl
if eval "test x$GCC = xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
if test "x$enable_ansi" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -ansi" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
fi
changequote([,])dnl
# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
# gcc2 uses "-fnative-struct".
if test x"$os_win32" = xyes; then
if test x"$GCC" = xyes; then
msnative_struct=''
AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
if test -z "$ac_cv_prog_CC"; then
our_gcc="$CC"
else
our_gcc="$ac_cv_prog_CC"
fi
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
2.)
if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
msnative_struct='-fnative-struct'
fi
;;
*)
if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
msnative_struct='-mms-bitfields'
fi
;;
esac
if test x"$msnative_struct" = x ; then