1dnl Example for use of GNU gettext. 2dnl Copyright (C) 2003 Free Software Foundation, Inc. 3dnl This file is in the public domain. 4dnl 5dnl Configuration file - processed by autoconf. 6 7AC_INIT 8AC_CONFIG_SRCDIR(Hello.java) 9AM_INIT_AUTOMAKE(hello-java, 0) 10 11dnl Check whether we can build native executable. 12AC_ARG_ENABLE(java-exe, 13 [ --disable-java-exe compile Java to bytecode only, not to native code], 14 :, enable_java_exe=yes) 15gt_GCJ 16if test "$enable_java_exe" != no && test -n "$HAVE_GCJ"; then 17 BUILDJAVAEXE=yes 18else 19 BUILDJAVAEXE=no 20fi 21AC_SUBST(BUILDJAVAEXE) 22AM_CONDITIONAL([USEJEXE], [test "$BUILDJAVAEXE" = yes]) 23AC_PROG_RANLIB 24 25dnl Check whether we can build Java programs at all. 26gt_JAVACOMP 27AC_CHECK_PROG(JAR, jar, jar) 28if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then 29 BUILDJAVA=yes 30else 31 BUILDJAVA=no 32fi 33AC_SUBST(BUILDJAVA) 34 35dnl Check whether we can execute Java programs. 36gt_JAVAEXEC 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