aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2021-02-09 18:12:35 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2021-02-23 11:01:07 +0200
commitee9a6a9a9e46aac337b8b105ef5d2c7e754ce3c0 (patch)
treed53c0bea86128efcd2de64450563ded893c52b7e
parente9aaa0c664582c137d17c764d9ef6f29c626a6fb (diff)
helper: create autoheader
Create autoheader_external for helper and move there the ODPH_* defines from odp autoheader_external. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r--.gitignore2
-rw-r--r--configure.ac21
-rw-r--r--helper/Makefile.am1
-rw-r--r--helper/include/odp/helper/autoheader_external.h.in11
-rw-r--r--helper/include/odp/helper/odph_debug.h2
-rw-r--r--helper/m4/configure.m425
-rw-r--r--helper/test/debug.c2
-rw-r--r--include/odp/autoheader_external.h.in6
8 files changed, 42 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index 772c551f4..0a58c0ee9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,8 @@ include/odp/autoheader_build.h
include/odp/autoheader_external.h
include/odp/autoheader_internal.h
include/odp/stamp-h*
+helper/include/odp/helper/autoheader_external.h
+helper/include/odp/helper/stamp-h*
lib/
libtool
ltmain.sh
diff --git a/configure.ac b/configure.ac
index 20d5af648..2761190a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ AS_IF([test "$ac_cv_env_CFLAGS_set" = ""], [user_cflags=0], [user_cflags=1])
# Initialize automake
AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects foreign nostdinc -Wall -Werror])
AC_CONFIG_SRCDIR([include/odp/api/spec/init.h])
-AM_CONFIG_HEADER([include/odp/autoheader_build.h include/odp/autoheader_external.h include/odp/autoheader_internal.h])
+AM_CONFIG_HEADER([include/odp/autoheader_build.h include/odp/autoheader_external.h include/odp/autoheader_internal.h helper/include/odp/helper/autoheader_external.h])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
@@ -356,15 +356,6 @@ AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1],
AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG],
[Define to 1 to include additional debug code])
-AC_ARG_ENABLE([helper-debug],
- [AS_HELP_STRING([--enable-helper-debug],
- [helpers include additional debugging code [default=disabled]])],
- [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug=yes],
- [enable_helper_debug=no])])
-AS_IF([test "x$enable_helper_debug" != "xno"], [ODPH_DEBUG=1], [ODPH_DEBUG=0])
-AC_DEFINE_UNQUOTED([ODPH_DEBUG], [$ODPH_DEBUG],
- [Define to 1 to include additional helper debug code])
-
##########################################################################
# Enable/disable ODP_DEBUG_PRINT
##########################################################################
@@ -378,16 +369,6 @@ AS_IF([test "x$enable_debug_print" != "xno"], [ODP_DEBUG_PRINT=1],
AC_DEFINE_UNQUOTED([ODP_DEBUG_PRINT], [$ODP_DEBUG_PRINT],
[Define to 1 to display debug information])
-AC_ARG_ENABLE([helper-debug-print],
- [AS_HELP_STRING([--enable-helper-debug-print],
- [display helper debugging information [default=disabled]])],
- [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug_print=yes],
- [enable_helper_debug_print=no])])
-AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1],
- [ODPH_DEBUG_PRINT=0])
-AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT],
- [Define to 1 to display helper debug information])
-
debug_settings="ODP_DEBUG=${ODP_DEBUG}, ODP_DEBUG_PRINT=${ODP_DEBUG_PRINT}, \
ODPH_DEBUG=${ODPH_DEBUG}, ODPH_DEBUG_PRINT=${ODPH_DEBUG_PRINT}"
diff --git a/helper/Makefile.am b/helper/Makefile.am
index 8c1c0ffc5..fc5090852 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -12,6 +12,7 @@ AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)'
helperincludedir = $(includedir)/odp/helper/
helperinclude_HEADERS = \
+ include/odp/helper/autoheader_external.h\
include/odp/helper/chksum.h\
include/odp/helper/odph_debug.h \
include/odp/helper/eth.h\
diff --git a/helper/include/odp/helper/autoheader_external.h.in b/helper/include/odp/helper/autoheader_external.h.in
new file mode 100644
index 000000000..987b1027e
--- /dev/null
+++ b/helper/include/odp/helper/autoheader_external.h.in
@@ -0,0 +1,11 @@
+
+#ifndef ODPH_AUTOHEADER_EXTERNAL_H_
+#define ODPH_AUTOHEADER_EXTERNAL_H_
+
+/* Define to 1 to include additional helper debug code */
+#undef ODPH_DEBUG
+
+/* Define to 1 to display helper debug information */
+#undef ODPH_DEBUG_PRINT
+
+#endif
diff --git a/helper/include/odp/helper/odph_debug.h b/helper/include/odp/helper/odph_debug.h
index 2fa89d8ab..39ce3f0d9 100644
--- a/helper/include/odp/helper/odph_debug.h
+++ b/helper/include/odp/helper/odph_debug.h
@@ -15,7 +15,7 @@
#ifndef ODPH_DEBUG_H_
#define ODPH_DEBUG_H_
-#include <odp/autoheader_external.h>
+#include <odp/helper/autoheader_external.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/helper/m4/configure.m4 b/helper/m4/configure.m4
index c25f8fe68..426dcd8ff 100644
--- a/helper/m4/configure.m4
+++ b/helper/m4/configure.m4
@@ -17,5 +17,30 @@ AC_ARG_ENABLE([helper-linux],
[helper_linux=$enableval],
[helper_linux=yes])
+##########################################################################
+# Enable/disable ODPH_DEBUG
+##########################################################################
+AC_ARG_ENABLE([helper-debug],
+ [AS_HELP_STRING([--enable-helper-debug],
+ [helpers include additional debugging code [default=disabled]])],
+ [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug=yes],
+ [enable_helper_debug=no])])
+AS_IF([test "x$enable_helper_debug" != "xno"], [ODPH_DEBUG=1], [ODPH_DEBUG=0])
+AC_DEFINE_UNQUOTED([ODPH_DEBUG], [$ODPH_DEBUG],
+ [Define to 1 to include additional helper debug code])
+
+##########################################################################
+# Enable/disable ODPH_DEBUG_PRINT
+##########################################################################
+AC_ARG_ENABLE([helper-debug-print],
+ [AS_HELP_STRING([--enable-helper-debug-print],
+ [display helper debugging information [default=disabled]])],
+ [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug_print=yes],
+ [enable_helper_debug_print=no])])
+AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1],
+ [ODPH_DEBUG_PRINT=0])
+AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT],
+ [Define to 1 to display helper debug information])
+
AC_CONFIG_FILES([helper/libodphelper.pc
helper/test/Makefile])
diff --git a/helper/test/debug.c b/helper/test/debug.c
index 2431b0ecd..3b8a69d8b 100644
--- a/helper/test/debug.c
+++ b/helper/test/debug.c
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <odp/autoheader_external.h>
+#include <odp/helper/autoheader_external.h>
#include <odp_api.h>
#include <odp/helper/odph_api.h>
diff --git a/include/odp/autoheader_external.h.in b/include/odp/autoheader_external.h.in
index 15626898d..978bc1f2b 100644
--- a/include/odp/autoheader_external.h.in
+++ b/include/odp/autoheader_external.h.in
@@ -8,10 +8,4 @@
/* Define to 1 to display debug information */
#undef ODP_DEBUG_PRINT
-/* Define to 1 to include additional helper debug code */
-#undef ODPH_DEBUG
-
-/* Define to 1 to display helper debug information */
-#undef ODPH_DEBUG_PRINT
-
#endif