aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <petsku@petteriraty.eu>2010-08-28 15:42:47 +0300
committerPetteri Räty <petsku@petteriraty.eu>2010-08-28 15:42:47 +0300
commit5e42c594f367665605c02e2ebccf1e226d73e274 (patch)
treee14aa8ef93221f0dd0aae840041eddaf44f15e87 /configure.ac
parentAdd more build system generated files to gitignore (diff)
downloadlibbash-5e42c594f367665605c02e2ebccf1e226d73e274.tar.gz
libbash-5e42c594f367665605c02e2ebccf1e226d73e274.tar.bz2
libbash-5e42c594f367665605c02e2ebccf1e226d73e274.zip
Handle autoreconf warnings
Enable warnings in autogen.sh by passing -W all to autoreconf. This pointed out things that are now fixed. AC_CHECK_FILE assumes you are checking for a runtime file so it fails for cross compiling and as such is not for our usage. Instead configure.ac now uses test -f.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 14 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 2b70f5b..127011f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,34 +16,34 @@
#along with libbash. If not, see <http://www.gnu.org/licenses/>.
##############################################
-AC_PREREQ([2.65])
+AC_PREREQ(2.65)
AC_CONFIG_MACRO_DIR([m4])
-AC_INIT([libbash], [0.1],[powerofazure@gmail.com])
+AC_INIT([libbash],[0.1],[powerofazure@gmail.com])
AM_INIT_AUTOMAKE([parallel-tests subdir-objects])
AC_PROG_CXX
LT_INIT
-AC_PROG_LIBTOOL
-AM_PROG_LIBTOOL
AC_PATH_PROG([JAVA],[java],"no")
if test "$JAVA" = "no"; then
AC_MSG_ERROR([No java executable found])
fi
GTEST_LIB_CHECK(,[:],[:])
+
AC_ARG_WITH(antlr, [],with_antlr=$withval,with_antlr=jc)
-if test "$with_antlr" = "jc"; then
- AC_PATH_PROG(JAVA_CONFIG, java-config, "no")
- if test "$JAVA_CONFIG" = "no"; then
- AC_MSG_ERROR([java-config tool not found. Please give the location of an antlr3 jar using --with-antlr])
- fi
- AC_SUBST(antlr_cp,["$($JAVA_CONFIG -dp antlr-3)"])
-else
- AC_CHECK_FILE(["$with_antlr"],[],[AC_MSG_ERROR(Antlr jar $with_antlr not found)])
- AC_SUBST(antlr_cp,["$with_antlr"])
-fi
+AS_IF([test "$with_antlr" = "jc"], [
+ AC_PATH_PROG(JAVA_CONFIG, java-config, "no")
+ if test "$JAVA_CONFIG" = "no"; then
+ AC_MSG_ERROR([java-config tool not found. Please give the location of an antlr3 jar using --with-antlr])
+ fi
+ AC_SUBST(antlr_cp,["$($JAVA_CONFIG -dp antlr-3)"])
+ ],
+ [test -f "$with_antlr"], [AC_SUBST(antlr_cp,["$with_antlr"])],
+ [AC_MSG_ERROR([Antlr jar $with_antlr not found])])
+
AC_PATH_PROG([PDFLATEX],[pdflatex],"no")
if test "$PDFLATEX" = "no"; then
AC_MSG_RESULT([pdflatex not found on your system. You will be unable to generate the coding standard])
fi
+
AC_CHECK_LIB([antlr3c],[antlr3AsciiFileStreamNew],[],[AC_MSG_ERROR(libasntlr3c not found. Have you installed the C antlr runtime?)])
AC_CONFIG_FILES([Makefile])
DX_HTML_FEATURE(ON)