make: Change configure to output ndn-cpp/ndn-cpp-config.h instead of config.h
diff --git a/.gitignore b/.gitignore
index c022302..4adb8c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,10 +16,10 @@
# Autoconf files
/Makefile
/autom4te.cache
-/config.h
/config.log
/config.status
-/stamp-h1
+/ndn-cpp/ndn-cpp-config.h
+/ndn-cpp/stamp-h1
/aclocal.m4
*.Po
.deps
diff --git a/Makefile.am b/Makefile.am
index 1e71378..663e85e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,7 +16,7 @@
# Just the C code.
libndn_c_la_SOURCES = \
- config.h \
+ ndn-cpp/ndn-cpp-config.h \
ndn-cpp/c/common.h \
ndn-cpp/c/data.h \
ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
@@ -49,7 +49,7 @@
# C++ code and also the C code.
libndn_cpp_la_SOURCES = \
$(libndn_c_la_SOURCES) \
- config.h \
+ ndn-cpp/ndn-cpp-config.h \
ndn-cpp/c/common.h \
ndn-cpp/common.hpp ndn-cpp/common.cpp \
ndn-cpp/data.cpp ndn-cpp/c/data.h ndn-cpp/data.hpp \
diff --git a/Makefile.in b/Makefile.in
index 582a950..74f31d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -99,7 +99,7 @@
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
+CONFIG_HEADER = $(top_builddir)/ndn-cpp/ndn-cpp-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -227,7 +227,7 @@
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ndn-cpp
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -505,7 +505,7 @@
# Just the C code.
libndn_c_la_SOURCES = \
- config.h \
+ ndn-cpp/ndn-cpp-config.h \
ndn-cpp/c/common.h \
ndn-cpp/c/data.h \
ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
@@ -539,7 +539,7 @@
# C++ code and also the C code.
libndn_cpp_la_SOURCES = \
$(libndn_c_la_SOURCES) \
- config.h \
+ ndn-cpp/ndn-cpp-config.h \
ndn-cpp/c/common.h \
ndn-cpp/common.hpp ndn-cpp/common.cpp \
ndn-cpp/data.cpp ndn-cpp/c/data.h ndn-cpp/data.hpp \
@@ -594,8 +594,7 @@
bin_test_publish_async_SOURCES = tests/test-publish-async.cpp
bin_test_publish_async_LDADD = libndn-cpp.la
dist_noinst_SCRIPTS = autogen.sh
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
.SUFFIXES:
.SUFFIXES: .c .cpp .lo .o .obj
@@ -635,20 +634,20 @@
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
-config.h: stamp-h1
- @test -f $@ || rm -f stamp-h1
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+ndn-cpp/ndn-cpp-config.h: ndn-cpp/stamp-h1
+ @test -f $@ || rm -f ndn-cpp/stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) ndn-cpp/stamp-h1
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
+ndn-cpp/stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f ndn-cpp/stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status ndn-cpp/ndn-cpp-config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
+ rm -f ndn-cpp/stamp-h1
touch $@
distclean-hdr:
- -rm -f config.h stamp-h1
+ -rm -f ndn-cpp/ndn-cpp-config.h ndn-cpp/stamp-h1
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@@ -1344,7 +1343,7 @@
exit 1; } >&2
check-am: all-am
check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) config.h
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS)
install-binPROGRAMS: install-libLTLIBRARIES
installdirs:
@@ -1482,7 +1481,7 @@
uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
-.MAKE: all install-am install-strip
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-cscope clean-generic \
diff --git a/configure b/configure
index d7c1e71..40854b0 100755
--- a/configure
+++ b/configure
@@ -3230,7 +3230,7 @@
fi
-ac_config_headers="$ac_config_headers config.h"
+ac_config_headers="$ac_config_headers ndn-cpp/ndn-cpp-config.h:config.h.in"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
@@ -19705,7 +19705,7 @@
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "ndn-cpp/ndn-cpp-config.h") CONFIG_HEADERS="$CONFIG_HEADERS ndn-cpp/ndn-cpp-config.h:config.h.in" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 19bfb0f..9b3002a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
AC_CONFIG_SRCDIR([config.h.in])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([ndn-cpp/ndn-cpp-config.h:config.h.in])
AM_MAINTAINER_MODE
AM_PROG_AR
AC_PROG_LIBTOOL
diff --git a/ndn-cpp/c/common.h b/ndn-cpp/c/common.h
index 3f27199..72af018 100644
--- a/ndn-cpp/c/common.h
+++ b/ndn-cpp/c/common.h
@@ -7,7 +7,7 @@
#ifndef NDN_COMMON_H
#define NDN_COMMON_H
-#include "../../config.h"
+#include "../ndn-cpp-config.h"
#include <stdint.h>
#include <stddef.h>
diff --git a/ndn-cpp/c/util/ndn_memory.h b/ndn-cpp/c/util/ndn_memory.h
index 68721e8..abf3bcf 100644
--- a/ndn-cpp/c/util/ndn_memory.h
+++ b/ndn-cpp/c/util/ndn_memory.h
@@ -5,7 +5,7 @@
*/
/*
- * Based on HAVE_MEMCPY and HAVE_MEMSET in config.h, use the library version or a local implementation of memcmp, memcpy and memset.
+ * Based on HAVE_MEMCPY and HAVE_MEMSET in ndn-cpp-config.h, use the library version or a local implementation of memcmp, memcpy and memset.
*/
#ifndef NDN_MEMORY_H
diff --git a/ndn-cpp/common.hpp b/ndn-cpp/common.hpp
index 70b36ed..74f0214 100644
--- a/ndn-cpp/common.hpp
+++ b/ndn-cpp/common.hpp
@@ -8,7 +8,7 @@
#define NDN_COMMON_HPP
#include <vector>
-// common.h includes config.h.
+// common.h includes ndn-cpp-config.h.
#include "c/common.h"
// Depending on where ./configure found shared_ptr, define the ptr_lib namespace.
diff --git a/ndn-cpp/security/identity/basic-identity-storage.cpp b/ndn-cpp/security/identity/basic-identity-storage.cpp
index dbdfda2..135bbe8 100644
--- a/ndn-cpp/security/identity/basic-identity-storage.cpp
+++ b/ndn-cpp/security/identity/basic-identity-storage.cpp
@@ -5,7 +5,7 @@
* See COPYING for copyright and distribution information.
*/
-// Only compile if config.h defines HAVE_SQLITE3.
+// Only compile if ndn-cpp-config.h defines HAVE_SQLITE3.
#include "../../c/common.h"
#if 0 // temporarily disable.
//#ifdef HAVE_SQLITE3
diff --git a/ndn-cpp/security/identity/basic-identity-storage.hpp b/ndn-cpp/security/identity/basic-identity-storage.hpp
index 1df05fe..7e8862b 100644
--- a/ndn-cpp/security/identity/basic-identity-storage.hpp
+++ b/ndn-cpp/security/identity/basic-identity-storage.hpp
@@ -8,7 +8,7 @@
#ifndef NDN_BASIC_IDENTITY_STORAGE_H
#define NDN_BASIC_IDENTITY_STORAGE_H
-// Only compile if config.h defines HAVE_SQLITE3.
+// Only compile if ndn-cpp-config.h defines HAVE_SQLITE3.
#include "../../c/common.h"
#if 0 // temporarily disable.
//#ifdef HAVE_SQLITE3
diff --git a/ndn-cpp/security/identity/osx-private-key-storage.cpp b/ndn-cpp/security/identity/osx-private-key-storage.cpp
index 2840e64..3efc99b 100644
--- a/ndn-cpp/security/identity/osx-private-key-storage.cpp
+++ b/ndn-cpp/security/identity/osx-private-key-storage.cpp
@@ -5,7 +5,7 @@
* See COPYING for copyright and distribution information.
*/
-// Only compile if config.h defines HAVE_OSX_SECKEYCHAIN 1.
+// Only compile if ndn-cpp-config.h defines HAVE_OSX_SECKEYCHAIN 1.
#include "../../c/common.h"
#if 0 // temporarily disable.
//#if HAVE_OSX_SECKEYCHAIN
diff --git a/ndn-cpp/security/identity/osx-private-key-storage.hpp b/ndn-cpp/security/identity/osx-private-key-storage.hpp
index a7febc2..edb15db 100644
--- a/ndn-cpp/security/identity/osx-private-key-storage.hpp
+++ b/ndn-cpp/security/identity/osx-private-key-storage.hpp
@@ -8,7 +8,7 @@
#ifndef NDN_OSX_PRIVATEKEY_STORAGE_H
#define NDN_OSX_PRIVATEKEY_STORAGE_H
-// Only compile if config.h defines HAVE_OSX_SECKEYCHAIN 1.
+// Only compile if ndn-cpp-config.h defines HAVE_OSX_SECKEYCHAIN 1.
#include "../../c/common.h"
#if 0 // temporarily disable.
//#if HAVE_OSX_SECKEYCHAIN