+2010-06-03 Bruno Haible <bruno@clisp.org>
+
+ urlget: Don't attempt to run the Java program if we don't install it.
+ * Makefile.am (USEJAVA): New variable.
+ (DEFS): Define USEJAVA.
+ * urlget.c (fetch): Don't try to use Java is USEJAVA is 0.
+
2010-05-19 Bruno Haible <bruno@clisp.org>
Link with libunistring, if it exists.
DEFS = \
-DLOCALEDIR=\"$(localedir)\" -DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+ -DUSEJAVA=$(USEJAVA) \
-DUSEJEXE=$(USEJEXE) \
-DGETTEXTJEXEDIR=\"$(pkglibdir)\" \
-DGETTEXTJAR=\"$(jardir)/gettext.jar\" \
# Special rules for Java compilation.
+USEJAVA = $(USEJAVA_@BUILDJAVAEXE@)
+USEJAVA_yes = 1
+USEJAVA_no = $(USEJAVA_no_@BUILDJAVA@)
+USEJAVA_no_yes = 1
+USEJAVA_no_no = 0
+
USEJEXE = $(USEJEXE_@BUILDJAVAEXE@)
USEJEXE_yes = 1
USEJEXE_no = 0
/* Get the contents of an URL.
- Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
fflush (stderr);
}
+#if USEJAVA
/* First try: using Java. */
{
const char *class_name = "gnu.gettext.GetURL";
const char *gettextjar;
const char *args[2];
-#if USEJEXE
+# if USEJEXE
/* Make it possible to override the executable's location. This is
necessary for running the testsuite before "make install". */
gettextjexedir = getenv ("GETTEXTJEXEDIR");
if (gettextjexedir == NULL || gettextjexedir[0] == '\0')
gettextjexedir = relocate (GETTEXTJEXEDIR);
-#else
+# else
gettextjexedir = NULL;
-#endif
+# endif
/* Make it possible to override the gettext.jar location. This is
necessary for running the testsuite before "make install". */
return;
}
}
+#endif
/* Second try: using "wget -q -O - -T 30 url". */
{