From 78218eb83e4fd506e5d83e79042428527b97393a Mon Sep 17 00:00:00 2001 From: Robert Hatcher Date: Mon, 20 Jul 2026 16:32:18 -0500 Subject: [PATCH] fix for detectiong both Geant4 v10 and v11 --- configure | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure b/configure index aecc04e17..64e539d51 100755 --- a/configure +++ b/configure @@ -885,16 +885,19 @@ if($gopt_enable_geant4_interface eq "YES") { # if it still not set, try autodetecting it if(! -d $gopt_with_geant4_lib && $auto_detect) { print "Auto-detecting GEANT4 library path...\n"; - $matched = auto_detect("libG4processes.so"); - if( $matched=~m/(\S*)\/libG4processes.so/i ) { + # v10 has libG4processes.so, but v11 has libG4processes_core.so + $matched = auto_detect("libG4processes.so","libG4processes_core.so"); + if( $matched=~m/(\S*)\/(?:libG4processes|libG4processes_core)\.so/i ) { $gopt_with_geant4_lib = $1; } print "Setting --with-geant4-lib=$gopt_with_geant4_lib\n"; } # check - my $fileso = "$gopt_with_geant4_lib/libG4processes.so"; - my $filedylib = "$gopt_with_geant4_lib/libG4processes.dylib"; - if(! -e $fileso && ! -e $filedylib) { + my $file10so = "$gopt_with_geant4_lib/libG4processes.so"; + my $file10dylib = "$gopt_with_geant4_lib/libG4processes.dylib"; + my $file11so = "$gopt_with_geant4_lib/libG4processes_core.so"; + my $file11dylib = "$gopt_with_geant4_lib/libG4processes_core.dylib"; + if(! -e $file10so && ! -e $file10dylib && ! -e $file11so && ! -e $file11dylib) { print "*** Error *** You need to specify the path to GEANT4 library using --with-geant4-lib=/some/path/\n"; print "*** Error *** Otherwise, you should --disable-geant4\n\n"; exit 1;