dnl Process this file with autoconf to produce a configure script.
dnl
dnl This file is part of Java-GNOME.
dnl
dnl Java-GNOME is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl Java-GNOME is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Jade; see the file COPYING.  If not, write to
dnl the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

AC_INIT(src/jni/org_gnu_gtk_Gtk.c)

gtkversion="2.4.6"
AC_SUBST(gtkversion)
gtkapiversion="2.4"
AC_SUBST(gtkapiversion)

INSTALLED_CLASSPATH=\${prefix}/share/java/gtk${gtkapiversion}-${gtkversion}.jar 
INSTALLED_JNI_DIR=\${prefix}/lib/jni/
INSTALLED_MACRO_DIR=\${prefix}/share/libgtk-java/macros/
AC_SUBST(INSTALLED_CLASSPATH)
AC_SUBST(INSTALLED_JNI_DIR)
AC_SUBST(INSTALLED_MACRO_DIR)

BUILDDIR=`pwd`

INSTALLED_CLASSPATH_BUILDPLACE=$BUILDDIR/lib/gtk${gtkapiversion}-${gtkversion}.jar 
INSTALLED_JNI_DIR_BUILDPLACE=$BUILDDIR/lib/
INSTALLED_MACRO_DIR_BUILDPLACE=$BUILDDIR/macros/
AC_SUBST(INSTALLED_CLASSPATH_BUILDPLACE)
AC_SUBST(INSTALLED_JNI_DIR_BUILDPLACE)
AC_SUBST(INSTALLED_MACRO_DIR_BUILDPLACE)

JG_COMMON

AC_OUTPUT(Makefile 
	gtk2-java.pc
	gtk2-java.pc.buildplace
	doc/Makefile
	doc/examples/runExample.sh
		src/Makefile
		src/java//org/gnu/gtk/Gtk.java
		src/java/org/gnu/gdk/Gdk.java
		src/java/org/gnu/glib/GObject.java
		)

`if test -e ../pkgconfig-tmp/; then cp gtk2-java.pc.buildplace ../pkgconfig-tmp/gtk2-java.pc; fi;`

`chmod +x doc/examples/runExample.sh`
