diff --git a/.gitignore b/.gitignore index 4644691..f15effc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,12 @@ /config.guess /json_config.h /config.h +/config.h.in /config.log /config.status /config.sub /configure +/compile /depcomp /doc /install-sh diff --git a/Makefile.am b/Makefile.am index 73e8116..590d3c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ include Makefile.am.inc -EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj +EXTRA_DIST = README.html README-WIN32.html config.h.win32 json-c.vcproj SUBDIRS = . tests lib_LTLIBRARIES = libjson-c.la @@ -39,10 +39,10 @@ libjson_cinclude_HEADERS = \ libjson_c_la_LDFLAGS = -version-info 2:0:0 -no-undefined if ENABLE_OLDNAME_COMPAT -libjson_la_LDFLAGS = -version-info 1:0:1 -no-undefined -ljson-c +libjson_la_LDFLAGS = -version-info 1:0:1 -no-undefined # Temporary libjson library. This will be removed after one release. -libjson_la_LIBADD = -ljson-c +libjson_la_LIBADD = libjson-c.la endif diff --git a/config.h.in b/config.h.in deleted file mode 100644 index a912bb0..0000000 --- a/config.h.in +++ /dev/null @@ -1,145 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if .gnu.warning accepts long strings. */ -#undef HAS_GNU_WARNING_LONG - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `open' function. */ -#undef HAVE_OPEN - -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#undef HAVE_REALLOC - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strncasecmp' function. */ -#undef HAVE_STRNCASECMP - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CDEFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* Define to 1 if you have the `vsnprintf' function. */ -#undef HAVE_VSNPRINTF - -/* Define to 1 if you have the `vsyslog' function. */ -#undef HAVE_VSYSLOG - -/* Public define for json_inttypes.h */ -#undef JSON_C_HAVE_INTTYPES_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - -/* Define to rpl_realloc if the replacement function should be used. */ -#undef realloc - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/configure.in b/configure.in index 64f9cbe..da50fdd 100644 --- a/configure.in +++ b/configure.in @@ -20,6 +20,7 @@ AM_CONDITIONAL(ENABLE_OLDNAME_COMPAT, [test "x${enable_oldname_compat}" != "xno" # Checks for libraries. # Checks for header files. +AM_PROG_CC_C_O AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(json_config.h) AC_HEADER_STDC diff --git a/tests/Makefile.am b/tests/Makefile.am index c6123ed..88335ab 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,8 @@ include ../Makefile.am.inc +AM_CPPFLAGS = -I$(top_srcdir) + LIBJSON_LA=$(top_builddir)/libjson-c.la check_PROGRAMS = test1 test1Formatted @@ -16,14 +18,14 @@ check_PROGRAMS += test_locale test1_LDADD = $(LIBJSON_LA) test1Formatted_LDADD= $(LIBJSON_LA) -test1Formatted_SOURCES = test1.c parse_flags.c -test1Formatted_CPPFLAGS = -DTEST_FORMATTED +test1Formatted_SOURCES = test1.c parse_flags.c parse_flags.h +test1Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED test2_LDADD = $(LIBJSON_LA) test2Formatted_LDADD= $(LIBJSON_LA) -test2Formatted_SOURCES = test2.c parse_flags.c -test2Formatted_CPPFLAGS = -DTEST_FORMATTED +test2Formatted_SOURCES = test2.c parse_flags.c parse_flags.h +test2Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED test4_LDADD = $(LIBJSON_LA)