1dnl Example for use of GNU gettext. 2dnl This file is in the public domain. 3dnl 4dnl Configuration file - processed by autoconf. 5 6AC_INIT 7AC_CONFIG_SRCDIR(Hello.java) 8AM_INIT_AUTOMAKE(hello-java-qtjambi, 0) 9 10dnl Check whether we can build native executable. 11dnl This does currently not work, since QtJambi requires a Java >= 1.5. 12dnl AC_ARG_ENABLE(java-exe, 13dnl [ --enable-java-exe compile Java to native code, not to bytecode], 14dnl :, enable_java_exe=no) 15dnl gt_GCJ 16dnl if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then 17dnl BUILDJAVAEXE=yes 18dnl else 19dnl BUILDJAVAEXE=no 20dnl fi 21BUILDJAVAEXE=no 22AC_SUBST(BUILDJAVAEXE) 23AM_CONDITIONAL([USEJEXE], [test $BUILDJAVAEXE = yes]) 24AC_PROG_RANLIB 25 26dnl Check whether we can execute Java programs. 27gt_JAVAEXEC([Test15], [$srcdir/m4]) 28dnl Check whether we can build Java programs. 29gt_JAVACOMP([1.5], [1.5]) 30AC_CHECK_PROG(JAR, jar, jar) 31if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then 32 BUILDJAVA=yes 33else 34 BUILDJAVA=no 35fi 36AC_SUBST(BUILDJAVA) 37if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then 38 TESTJAVA=yes 39else 40 TESTJAVA=no 41fi 42AC_SUBST(TESTJAVA) 43 44dnl Checks for compiler output filename suffixes. 45AC_OBJEXT 46AC_EXEEXT 47 48dnl Checks for needed libraries. 49AM_PATH_PROG_WITH_TEST([GETTEXT_WITH_LIBINTL_JAR], [gettext], 50 [{ basedir=`echo "$ac_dir" | sed -e 's,/bin$,,'`; test -r "$basedir"/share/gettext/libintl.jar; }]) 51if test -z "$GETTEXT_WITH_LIBINTL_JAR"; then 52 echo "Required library libintl.jar not found." 1>&2 53 exit 1 54fi 55changequote(,)dnl 56basedir=`echo "$GETTEXT_WITH_LIBINTL_JAR" | sed -e 's,/[^/]*$,,' | sed -e 's,/bin$,,'` 57changequote([, ])dnl 58LIBINTL_JAR="$basedir"/share/gettext/libintl.jar 59AC_SUBST([LIBINTL_JAR]) 60 61dnl Support for the po directory. 62AM_PO_SUBDIRS 63 64AC_CONFIG_FILES([Makefile]) 65AC_CONFIG_FILES([javacomp.sh]) 66AC_CONFIG_FILES([javaexec.sh]) 67AC_CONFIG_FILES([m4/Makefile]) 68AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE]) 69AC_OUTPUT 70