]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3731] Fix some compiler checks and some fallbacks on old systems
authorAndrei Pavel <andrei@isc.org>
Fri, 14 Mar 2025 07:39:50 +0000 (09:39 +0200)
committerAndrei Pavel <andrei@isc.org>
Mon, 17 Mar 2025 10:16:21 +0000 (12:16 +0200)
meson.build
subprojects/mysql/meson.build
subprojects/netconf/meson.build
subprojects/postgresql/meson.build

index d1c3cd3211f6e3bd8c330f59c467cc58d0285b2d..08b59dac298cae1addeff0cc95a997ac384816b6 100644 (file)
@@ -301,7 +301,7 @@ endif
 result = cpp.run(
     fs.read('compiler-checks/have-generic-tls-method.cc'),
     name: 'HAVE_GENERIC_TLS_METHOD',
-    dependencies: [CRYPTO_DEP],
+    dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
 )
 conf_data.set('HAVE_GENERIC_TLS_METHOD', result.returncode() == 0)
 
@@ -340,7 +340,7 @@ endif
 result = cpp.run(
     fs.read('compiler-checks/stream-truncated-error.cc'),
     name: 'HAVE_STREAM_TRUNCATED_ERROR',
-    dependencies: [CRYPTO_DEP],
+    dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
 )
 conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
 
index e8b051811472890fe62b7093cf266d7216875149..705d1014e042af91d461a789f8e9a484575d2bb4 100644 (file)
@@ -8,12 +8,12 @@ foreach mysql_config_file : ['mariadb_config', 'mysql_config']
     if not mysql_config.found()
         continue
     endif
-    cflags = run_command([mysql_config, '--cflags'], check: false)
+    cxxflags = run_command([mysql_config, '--cxxflags'], check: false)
     libs = run_command([mysql_config, '--libs'], check: false)
     version = run_command([mysql_config, '--version'], check: false)
 
-    if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
-        mysql_compile_args = cflags.stdout().split()
+    if cxxflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+        mysql_compile_args = cxxflags.stdout().split()
         mysql_link_args = libs.stdout().split()
         mysql_version = version.stdout().strip()
         mysql = declare_dependency(
index 5df322917806785fb933db195f5f3104623513e0..e81fdd238850318e5013feb8eb252d5d9508bde8 100644 (file)
@@ -78,6 +78,6 @@ if all_deps_found
     )
 else
     # Can't use a disabler here?
-    netconf = declare_dependency('', required: false)
+    netconf = declare_dependency('')
 endif
 
index 2d65a8595fe8bb0db2e3d7ada8ea125dff7cfddf..9ca8b88aaea395554311472299dd67fb993e0ad0 100644 (file)
@@ -2,15 +2,18 @@ project('postgresql')
 postgresql = disabler()
 pg_config = find_program('pg_config', required: false)
 if pg_config.found()
-    cflags = run_command([pg_config, '--cflags'], check: false)
+    cppflags = run_command([pg_config, '--cppflags'], check: false)
+    includedir = run(command[pg_config, '--includedir'], check: false)
     libs = run_command([pg_config, '--libs'], check: false)
     version = run_command([pg_config, '--version'], check: false)
-    if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
-        pgsql_compile_args = cflags.stdout().split()
+    if cppflags.returncode() == 0 and includedir.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+        pgsql_compile_args = cppflags.stdout().split()
+        pgsql_includedir_args = includedir.stdout().split()
         pgsql_link_args = libs.stdout().split()
         pgsql_version = version.stdout().strip()
         postgresql = declare_dependency(
             compile_args: pgsql_compile_args,
+            include_directories: pgsql_includedir_args,
             link_args: pgsql_link_args,
             version: pgsql_version,
         )