Permalink
Browse files

Allow jim to be used as an autoconf subdir

Ensure that no public headers include the autoconf
header, jimautoconf.h, as it leads to problems
with redefined symbols.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
  • Loading branch information...
1 parent b7a3951 commit 5a9c9cdc1a0add1d0e6e63e64d5d7d7febc6d749 @msteveb committed Nov 8, 2010
Showing with 23 additions and 15 deletions.
  1. +4 −3 Makefile.in
  2. +2 −2 configure
  3. +1 −1 configure.ac
  4. +1 −0 jim-aio.c
  5. +1 −1 jim-array.c
  6. +2 −2 jim-bio.c
  7. +1 −0 jim-clock.c
  8. 0 jimautoconfext.h.in → jim-config.h.in
  9. +1 −0 jim-eventloop.c
  10. +1 −0 jim-exec.c
  11. +1 −0 jim-file.c
  12. +2 −1 jim-load.c
  13. +2 −2 jim-package.c
  14. +1 −0 jim-posix.c
  15. +0 −1 jim-readdir.c
  16. +0 −1 jim-readline.c
  17. +1 −0 jim-signal.c
  18. +1 −0 jim-win32compat.c
  19. +1 −1 jim.h
View
@@ -68,8 +68,9 @@ install: all docs $(EXTENSION_TCL)
install $(LIBJIM) $(DESTDIR)/lib
install README.extensions $(EXTENSION_MODS) $(EXTENSION_TCL) $(DESTDIR)/lib/jim
install -d $(DESTDIR)/include
- install @SRCDIR@/jim.h @SRCDIR@/jim-*.h $(DESTDIR)/include
- install jimautoconfext.h $(DESTDIR)/include/jimautoconf.h
+ install @SRCDIR@/jim.h @SRCDIR@/jim-eventloop.h @SRCDIR@/jim-nvp.h @SRCDIR@/jim-signal.h \
+ @SRCDIR@/jim-subcmd.h @SRCDIR@/jim-win32compat.h $(DESTDIR)/include
+ install jim-config.h $(DESTDIR)/include
install -d $(DESTDIR)/doc/jim
install Tcl.html $(DESTDIR)/doc/jim
@@ -99,7 +100,7 @@ clean:
if [ -f .clean ]; then rm -f `cat .clean` .clean; fi
distclean: clean
- rm -f jimautoconf.h jimautoconfext.h Makefile config.status config.log
+ rm -f jimautoconf.h jim-config.h Makefile config.status config.log
rm -rf autom4te.cache
ship: Tcl.html
View
@@ -4256,7 +4256,7 @@ PLATFORM_OS=`uname -s`
PLATFORM_PLATFORM=unix
-ac_config_files="$ac_config_files Makefile jimautoconfext.h"
+ac_config_files="$ac_config_files Makefile jim-config.h"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4961,7 +4961,7 @@ do
case $ac_config_target in
"jimautoconf.h") CONFIG_HEADERS="$CONFIG_HEADERS jimautoconf.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "jimautoconfext.h") CONFIG_FILES="$CONFIG_FILES jimautoconfext.h" ;;
+ "jim-config.h") CONFIG_FILES="$CONFIG_FILES jim-config.h" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
View
@@ -353,5 +353,5 @@ AC_SUBST(SRCDIR,`dirname $0`)
AC_SUBST(PLATFORM_OS,`uname -s`)
AC_SUBST(PLATFORM_PLATFORM,unix)
-AC_CONFIG_FILES([Makefile jimautoconfext.h])
+AC_CONFIG_FILES([Makefile jim-config.h])
AC_OUTPUT
View
@@ -45,6 +45,7 @@
#include <fcntl.h>
#include "jim.h"
+#include "jimautoconf.h"
#if !defined(JIM_ANSIC)
#include <sys/socket.h>
View
@@ -1,6 +1,6 @@
/*
- * Implements the file command for jim
+ * Implements the array command for jim
*
* (c) 2008 Steve Bennett <steveb@workware.net.au>
*
View
@@ -28,8 +28,8 @@
#include <time.h>
#include <errno.h>
-#include <jim.h>
-#include <jim-subcmd.h>
+#include "jim.h"
+#include "jim-subcmd.h"
static int hex2char(const char *hex)
{
View
@@ -15,6 +15,7 @@
#include <sys/time.h>
#include "jim.h"
+#include "jimautoconf.h"
#include "jim-subcmd.h"
static int clock_cmd_format(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
File renamed without changes.
View
@@ -39,6 +39,7 @@
**/
#include "jim.h"
+#include "jimautoconf.h"
#include "jim-eventloop.h"
/* POSIX includes */
View
@@ -24,6 +24,7 @@
#include <sys/wait.h>
#include "jim.h"
+#include "jimautoconf.h"
#include "jim-subcmd.h"
#include "jim-signal.h"
View
@@ -53,6 +53,7 @@
#include <sys/param.h>
#include "jim.h"
+#include "jimautoconf.h"
#include "jim-subcmd.h"
#ifndef MAXPATHLEN
View
@@ -1,4 +1,5 @@
-#include <jim.h>
+#include "jim.h"
+#include "jimautoconf.h"
#include <string.h>
/* -----------------------------------------------------------------------------
View
@@ -1,8 +1,8 @@
#include <unistd.h>
#include <string.h>
-#include <jim.h>
-#include <jim-subcmd.h>
+#include "jim.h"
+#include "jim-subcmd.h"
/* -----------------------------------------------------------------------------
* Packages handling
View
@@ -27,6 +27,7 @@
#include <errno.h>
#include "jim.h"
+#include "jimautoconf.h"
#ifdef HAVE_SYSINFO
#include <sys/sysinfo.h>
View
@@ -50,7 +50,6 @@
#include <string.h>
#include <dirent.h>
-#define JIM_EXTENSION
#include "jim.h"
/*
View
@@ -18,7 +18,6 @@
* limitations under the License.
*/
-#define JIM_EXTENSION
#include "jim.h"
#include <readline/readline.h>
View
@@ -10,6 +10,7 @@
#include <unistd.h>
#include "jim.h"
+#include "jimautoconf.h"
#include "jim-subcmd.h"
#include "jim-signal.h"
View
@@ -1,4 +1,5 @@
#include <jim.h>
+#include "jimautoconf.h"
#ifdef HAVE_DLOPEN_COMPAT
void *dlopen(const char *path, int mode)
View
2 jim.h
@@ -82,7 +82,7 @@ extern "C" {
#include <jim-win32compat.h>
#ifndef HAVE_NO_AUTOCONF
-#include <jimautoconf.h>
+#include <jim-config.h>
#endif
/* -----------------------------------------------------------------------------

0 comments on commit 5a9c9cd

Please sign in to comment.