--- a/configure +++ b/configure @@ -427,9 +427,9 @@ $arch_yacc = "yacc"; $arch_yflags = "-d"; $arch_coptout = "-o "; -$arch_copts = ""; # used to make CFLAGS (for C) -$arch_cppopts = ""; # used to make CPPFLAGS (for C++) -$arch_lopts = ""; # used to make LOADLIBES (for the linker) +$arch_copts = $ENV{"CFLAGS"} . " " . $ENV{"CPPFLAGS"}; # used to make CFLAGS (for C) +$arch_cppopts = $ENV{"CXXFLAGS"} . " " . $ENV{"CPPFLAGS"}; # used to make CPPFLAGS (for C++) +$arch_lopts = $ENV{"LDFLAGS"}; # used to make LOADLIBES (for the linker) $arch_opt_flag = "-O"; $arch_debug_flag = "-g"; @@ -1976,14 +1976,14 @@ if ($config_arch eq "LINUXAMD64") { if ($config_static) { # link everything statically (this won't work due to libGL issues) - $arch_lopts = "-static"; + $arch_lopts .= " -static"; } else { # link the Intel compiler libraries statically, and use the GCC C++ libs # $arch_lopts = "-static-libcxa -cxxlib-gcc"; # dynamically link all libs, and use Intel libs where possible - $arch_lopts = "-rdynamic "; + $arch_lopts .= " -rdynamic "; } - $arch_lopts .= "-i-static "; + $arch_lopts .= " -i-static "; } else { # for compiling with g++: $arch_cc = "gcc"; @@ -1995,9 +1995,9 @@ if ($config_arch eq "LINUXAMD64") { # so far only STATIC version tested if ($config_static) { - $arch_lopts = "-static"; + $arch_lopts .= " -static"; } else { - $arch_lopts = "-rdynamic"; + $arch_lopts .= " -rdynamic"; } } @@ -2022,7 +2022,7 @@ if ($config_arch eq "LINUXAMD64") { $arch_opt_flag .= " -fPIC"; $arch_copts .= " -fPIC"; $arch_nvccflags .= " -Xcompiler -fPIC"; - $arch_lopts = "-shared"; + $arch_lopts .= " -shared"; $arch_cppopts .= " -DVMD_SHARED"; } } --- a/plugins_source/Make-arch +++ b/plugins_source/Make-arch @@ -358,13 +358,13 @@ LINUXALPHA: LINUXAMD64: $(MAKE) dynlibs staticlibs bins \ "ARCH = LINUXAMD64" \ - "COPTO = -fPIC -m64 -o " \ - "LOPTO = -fPIC -m64 -o " \ + "COPTO = -fPIC -m64 -o "$(LDFLAGS)" " \ + "LOPTO = -fPIC -m64 -o "$(LDFLAGS)" " \ "CC = gcc" \ "CXX = g++" \ "DEF = -D" \ - "CCFLAGS = -m64 -O2 -fPIC -Wall" \ - "CXXFLAGS = -m64 -O2 -fPIC -Wall" \ + "CCFLAGS = -m64 -O2 -fPIC -Wall "$(CFLAGS) \ + "CXXFLAGS = -m64 -O2 -fPIC -Wall "$(CXXFLAGS) \ "TCLLDFLAGS = -ltcl8.5 -ldl" \ "NETCDFLDFLAGS = -lnetcdf " \ "AR = ar" \