commit 9c74b9b39ccc5ebffaaf4338523f55418773361e
parent bb43620f16ed819f693ccd4075bae2f096a69318
Author: Evgeny Grin <k2k@drgrin.dev>
Date: Tue, 29 Apr 2025 20:08:43 +0300
mhd_config.h: moved to separate directory
Diffstat:
9 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/Makefile.am b/Makefile.am
@@ -427,6 +427,8 @@ maintainer-clean-po:
.PHONY: distclean-po maintainer-clean-po
+MOSTLYCLEANFILES += MHD_config.h
+
check-sources-missing:
@echo 'cd src/mhd2 && $(MAKE) $(AM_MAKEFLAGS) $@' && \
$(am__cd) src/mhd2 && $(MAKE) $(AM_MAKEFLAGS) '$@'
diff --git a/configure.ac b/configure.ac
@@ -26,7 +26,7 @@ LT_PREREQ([2.4.0])
AC_INIT([GNU libmicrohttpd2],[1.99.0],[libmicrohttpd@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
MHD_AUX_DIR='build-aux' # Must be set to the same value as in the previous line
-AC_CONFIG_HEADERS([src/incl_priv/mhd_config.h])
+AC_CONFIG_HEADERS([src/incl_priv/config/mhd_config.h])
AC_CONFIG_MACRO_DIR([m4])
m4_pattern_forbid([^_?MHD_[A-Z_]+_CC_])dnl
@@ -7532,6 +7532,7 @@ doc/Makefile
m4/Makefile
src/Makefile
src/incl_priv/Makefile
+src/incl_priv/config/Makefile
src/include/Makefile
src/mhd2/Makefile
src/tests/Makefile
diff --git a/src/incl_priv/Makefile.am b/src/incl_priv/Makefile.am
@@ -1,3 +1,7 @@
# This Makefile.am is in the public domain
+SUBDIRS = config .
+
noinst_HEADERS = mhd_sys_options.h
+
+MOSTLYCLEANFILES = mhd_config.h
diff --git a/src/incl_priv/.gitignore b/src/incl_priv/config/.gitignore
diff --git a/src/incl_priv/config/Makefile.am b/src/incl_priv/config/Makefile.am
@@ -0,0 +1 @@
+# This Makefile.am is in the public domain
diff --git a/src/incl_priv/mhd_sys_options.h b/src/incl_priv/mhd_sys_options.h
@@ -1,6 +1,6 @@
/*
This file is part of libmicrohttpd
- Copyright (C) 2016-2024 Karlson2k (Evgeny Grin)
+ Copyright (C) 2016-2025 Karlson2k (Evgeny Grin)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -19,13 +19,13 @@
/**
* @file src/include/mhd_sys_options.h
- * @brief additional automatic macros for MHD_config.h
+ * @brief additional automatic macros for mhd_config.h
* @author Karlson2k (Evgeny Grin)
*
- * This file includes MHD_config.h and adds automatic macros based on values
- * in MHD_config.h, compiler built-in macros and commandline-defined macros
+ * This file includes mhd_config.h and adds automatic macros based on values
+ * in mhd_config.h, compiler built-in macros and commandline-defined macros
* (but not based on values defined in other headers). Works also as a guard
- * to prevent double inclusion of MHD_config.h
+ * to prevent double inclusion of mhd_config.h
*
* This file must be included always before other headers as this header
* defines macros that control behaviour of other included headers.
@@ -35,8 +35,10 @@
#define MHD_SYS_OPTIONS_H 1
#ifndef HAVE_CONFIG_H
+#ifndef _MSC_VER
#error HAVE_CONFIG_H must be defined
#endif
+#endif
#include "mhd_config.h"
diff --git a/src/mhd2/Makefile.am b/src/mhd2/Makefile.am
@@ -286,11 +286,11 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmicrohttpd2.pc
-$(CONFIG_HEADER): $(builddir)/../incl_priv/mhd_config.h.in $(top_srcdir)/configure $(top_builddir)/config.status
- @echo "cd $(srcdir)/../incl_priv && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h" && \
- $(am__cd) $(srcdir)/../incl_priv && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h
+$(CONFIG_HEADER): $(builddir)/../incl_priv/config/mhd_config.h.in $(top_builddir)/config.status
+ @echo "cd $(srcdir)/../incl_priv/config && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h" && \
+ $(am__cd) $(srcdir)/../incl_priv/config && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h
-$(builddir)/../incl_priv/mhd_config.h.in: $(top_srcdir)/configure.ac
+$(builddir)/../incl_priv/config/mhd_config.h.in: $(top_srcdir)/configure.ac
@echo "cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh" && \
$(am__cd) $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
diff --git a/src/tests/basic/Makefile.am b/src/tests/basic/Makefile.am
@@ -180,3 +180,6 @@ test_create_start_destroy_poll_thread_per_conn_ipv4_SOURCES = $(basic_test_sourc
test_create_start_destroy_epoll_int_thread_ipv4_SOURCES = $(basic_test_sources)
test_create_start_destroy_epoll_thread_pool_ipv4_SOURCES = $(basic_test_sources)
+
+test_lib_info_version_CPPFLAGS = \
+ -I$(top_srcdir)/src/incl_priv $(AM_CPPFLAGS)
diff --git a/src/tests/client_server/Makefile.am b/src/tests/client_server/Makefile.am
@@ -2,6 +2,7 @@
EMPTY_ITEM =
AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/incl_priv \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/mhd2 \
-DMHD_CPU_COUNT=$(CPU_COUNT) \