Skip to content

Commit

Permalink
java extensiosn autoconf/automake setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Aug 25, 2012
1 parent 1a1bae8 commit 370840f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
24 changes: 24 additions & 0 deletions config/ac_java_extenions.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##*****************************************************************************
## $Id: ac_java_extensions.m4,v 1.1 2009-02-19 00:50:17 chu11 Exp $
##*****************************************************************************

AC_DEFUN([AC_JAVA_EXTENSIONS],
[
AC_MSG_CHECKING(for --with-java-extensions)
AC_ARG_WITH(java-extensions,
AC_HELP_STRING([--with-java-extensions=],
[enable or disable java extensions build]),
[ case "$withval" in
yes)
ac_with_java_extensions=yes
;;
no)
ac_with_java_extensions=no
;;
*)
ac_with_java_extensions=yes
;;
esac ]
)
AC_MSG_RESULT(${ac_with_java_extensions=yes})
])
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
AC_PATH_PROG([PERL], [perl])
AC_PATH_PROG([PYTHON], [python])
AC_PATH_PROG([POD2MAN], [pod2man], [/usr/bin/pod2man], [$PATH:/usr/perl5/bin/])
AC_PATH_PROG([JAVAC], [javac])
AC_PATH_PROG([JAVA], [java])
AC_DEBUG

##
Expand Down Expand Up @@ -190,6 +192,12 @@ AM_CONDITIONAL(WITH_PYTHON_EXTENSIONS, [test "$ac_with_python_extensions" = "yes
AC_CPLUSPLUS_EXTENSIONS
AM_CONDITIONAL(WITH_CPLUSPLUS_EXTENSIONS, [test "$ac_with_cplusplus_extensions" = "yes"])

#
# Check for java stuff
#
AC_JAVA_EXTENSIONS
AM_CONDITIONAL(WITH_JAVA_EXTENSIONS, [test "$ac_with_java_extensions" = "yes"])

##
# Checks for typedefs, structures, and compiler characteristics.
##
Expand Down Expand Up @@ -231,6 +239,7 @@ AC_CONFIG_FILES( \
src/extensions/perl/Genders/Genders.pm \
src/extensions/python/Makefile \
src/extensions/python/genderssetup.py \
src/extensions/java/Makefile \
src/testsuite/Makefile \
src/testsuite/libgenders/Makefile \
src/testsuite/libgenders/testdatabases/Makefile \
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
## Process this file with automake to produce Makefile.in.
##*****************************************************************************

SUBDIRS = cplusplus perl python
SUBDIRS = cplusplus java perl python
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
if WITH_JAVA_EXTENSIONS
all:
javac gov/llnl/lc/chaos/Genders.java
javac gov/llnl/lc/chaos/GendersException.java
Expand All @@ -20,3 +21,4 @@ clean:
rm -f src/libGenders.so
rm -f src/Genders.h
rm -f GendersTest/*.class
endif

0 comments on commit 370840f

Please sign in to comment.