Commit 5f3a5a66 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Start of changes for autoconfiscated build on Win32. Mostly similar to how

2002-03-29  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Start of changes for autoconfiscated build on
	Win32. Mostly similar to how it is done in the gimp-1-2 branch:

	Set LT_CURRENT_MINUS_AGE to $LT_CURRENT - $LT_AGE, this is used by
	libtool in DLL names, we need it for the *.rc.in files in case we
	want to have version resources in DLLs (these include the original
	filename). AC_SUBST it.

	Call AC_LIBTOOL_WIN32_DLL.

	Test for Win32 platform and native Win32, set automake
	conditionals PLATFORM_WIN32 and OS_WIN32. Set PATHSEP to ';' or
	':', AC_SUBST it.

	If on Win32, test for lib.exe availability (to build MS import
	libraries), set automake conditional MS_LIB_AVAILABLE.

	Include GLIB_LIBS when checking for bind_textdomain_codeset, in
	case using a separate -lintl.

	Don't try to link with -lX11 when looking for libXpm unless the
	GDK backend is x11. On Win32 we use the "no-X" version of libXpm.
parent 9e76b551
2002-03-29 Tor Lillqvist <tml@iki.fi>
* configure.in: Start of changes for autoconfiscated build on
Win32. Mostly similar to how it is done in the gimp-1-2 branch:
Set LT_CURRENT_MINUS_AGE to $LT_CURRENT - $LT_AGE, this is used by
libtool in DLL names, we need it for the *.rc.in files in case we
want to have version resources in DLLs (these include the original
filename). AC_SUBST it.
Call AC_LIBTOOL_WIN32_DLL.
Test for Win32 platform and native Win32, set automake
conditionals PLATFORM_WIN32 and OS_WIN32. Set PATHSEP to ';' or
':', AC_SUBST it.
If on Win32, test for lib.exe availability (to build MS import
libraries), set automake conditional MS_LIB_AVAILABLE.
Include GLIB_LIBS when checking for bind_textdomain_codeset, in
case using a separate -lintl.
Don't try to link with -lX11 when looking for libXpm unless the
GDK backend is x11. On Win32 we use the "no-X" version of libXpm.
2002-03-28 Nathan Summers <rock@gimp.org>
* libgimptool
......
......@@ -29,6 +29,7 @@ LT_RELEASE=$GIMP_MAJOR_VERSION.$GIMP_MINOR_VERSION
LT_CURRENT=`expr $GIMP_MICRO_VERSION - $GIMP_INTERFACE_AGE`
LT_REVISION=$GIMP_INTERFACE_AGE
LT_AGE=`expr $GIMP_BINARY_AGE - $GIMP_INTERFACE_AGE`
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
VERSION=$GIMP_VERSION
PACKAGE=gimp
......@@ -40,6 +41,7 @@ AM_CONFIG_HEADER(config.h)
dnl Initialize libtool
AC_PROG_CC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl Set AS and ASFLAGS so that automake 1.5 will be happy
......@@ -56,6 +58,38 @@ AC_CANONICAL_HOST
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_MSG_CHECKING([for some Win32 platform])
case "$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 "$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")
if test "$os_win32" = "yes"; then
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
dnl Checks for programs.
AC_ISC_POSIX
AM_PROG_CC_STDC
......@@ -352,7 +386,13 @@ AC_CHECK_FUNC(random, [
[AC_DEFINE(RAND_FUNC, rand) AC_DEFINE(SRAND_FUNC, srand)])])])
dnl check some more funcs
AC_CHECK_FUNCS(difftime putenv mmap bind_textdomain_codeset)
AC_CHECK_FUNCS(difftime putenv mmap)
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
gimp_save_LIBS=$LIBS
LIBS="$LIBS $GLIB_LIBS"
AC_CHECK_FUNCS(bind_textdomain_codeset)
LIBS=$gimp_save_LIBS
dnl check for rint
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), [
......@@ -553,12 +593,15 @@ dnl Test for libmpeg
dnl Test for libXpm
gimp_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
if test "$gdk_target" = x11; then
lib_X11=-lX11
fi
if test -z "$LIBXPM"; then
AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
[AC_CHECK_HEADER(X11/xpm.h,
XPM='xpm'; LIBXPM="$X_LIBS $X_PRE_LIBS -lX11 -lXpm",
XPM='xpm'; LIBXPM="$X_LIBS $X_PRE_LIBS $lib_X11 -lXpm",
[AC_MSG_WARN(*** XPM plug-in will not be built (XPM header file not found) ***)])],
[AC_MSG_WARN(*** XPM plug-in will not be built (XPM library not found) ***)], $X_PRE_LIBS -lX11)
[AC_MSG_WARN(*** XPM plug-in will not be built (XPM library not found) ***)], $X_PRE_LIBS $lib_X11)
fi
LDFLAGS="$gimp_save_LDFLAGS"
......@@ -798,6 +841,7 @@ AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AC_SUBST(LT_CURRENT_MINUS_AGE)
AC_SUBST(X_LIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment