see #991, #992, and #993.
To support Ubuntu 20.04 we must support new versions of python and gtest. Python has changed the way it provided libraries using python-config, so adjustments had to be made. I've completely ditched the built in autoconf function for finding python, because it adds a bunch of extra flags we don't need for Trick.
Now when we look for python with configure, it will search for python in this order:
python${PYTHON_VERSION}
python
python3
For python-config, it will search in this order:
python<major_version.minor_version>-config
python<major_version>-config
python${PYTHON_VERSION}-config
python-config
python3-config
Instead of python-config --ldflags, we are using python-config --libs
This only gets the flags we need.
For python >= 3.8 we use
python-config --libs --embed
this way it will add -lpython to the flags
If we can't find python in the configure script then search for
python3. If python3 is found use python3-config to get the
include directories and libraries. Call python scripts using the
PYTHON environment variable.
Added a new configure arugument "--enable-32bit". If enabled,
TRICK_FORCE_32BIT is automatically set for building Trick and for
all sims built. Changed the ARCH and added -m32 in the configure
script if 32bit is enabled. This changes the configure script to
test for 32bit libraries.
Found if --without-x was specified, that automatically caused an
error condition in the configure script. Fixed that and only
tested for X windows headers and libs if X is included. Excluded
a couple of directories from compiling if X is not included.
Didn't seem to be a problem with java.
If we are on a Mac, use xcrun to find the standard include directories.
Some of the makefiles in data_products look for libxml2 which requires
them to get the same change as the configure script.
When compiling Trick with the --with-tpro option for use of a real-time clock, the TPROCTE_HOME variable was being assigned the contents of the withval variable instead of being assigned to the TPRO_HOME variable. The TPROCTE_HOME variable was never used and the TPRO_HOME variable will always be an empty string. Thus, the configuration file will always check for only /h/tpro.h instead of <user-provided-path-to-tpro>/h/tpro.h
Other things I tried:
1. Pass the full path of the library directly to the linker.
Doesn't work for 32-bit builds because ICG needs the 64-bit version.
2. Use -static to have the linker statically link in the library.
Doesn't work because there is no 64-bit static library on default
installs.
Fixes#525
Added echos to all compile commands to append to MAKE_out. tee'd
the output of the compile command so that it will go to both the MAKE_out
file and the screen.
The configure script will check in the standard directories for
HDF5, GSL, and gtest. The user can skip this automatic check by
adding --without-<feature> while running the configure script.
refs #260
Fixed the configure script to allow the user to specify using a python3
interpreter. Had to change the the way to load the swig generated python modules.
Also had to change code dealing with python strings, oct, long, and
boolean operations.
refs #258
Set LD in our makefiles to the ld executable found by configure.
Changed the final sim link to use TRICK_CPPC as the link command since
it was using the compiler anyways. Changed the places where we use "ld" to
use LD.
refs #131
Added a check to test the version of g++ in the configure script.
Also did a "which" command to save the full path of the CC and CXX
commands. This will ensure that the same CC and CXX executables
are run no matter how the environment changes.
refs #255
Created a configure time test to see if clang will compile ICG correctly.
If the compilation fails, an error message telling the user to go download
clang/llvm from llvm.org is show.
refs #174
If no argument is given with --with-gsl or --with-hdf5 we search
/usr/include for the proper header files. If found we set the
configure variables for these packages to /usr. If not found we
emit an error message.
refs #199