Add 3 new env variables for ./configure: LIBTIFF, LIBPNG, and LIBJPEG

Adds 3 new environments variables to ./configure script:
- LIBJPEG
- LIBPNG
- LIBTIFF

Similar to like we handle ZLIB.

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
Signed-off-by: Fons Rademakers <Fons.Rademakers@cern.ch>
Drop grep and lipo -info from check_libcompat for Darwin

lipo supports -verify_arch option on Darwin target, which works
for fat and non-fat binaries. -verify_arch exists with status 0
if specified architecture is available in the binary.

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
Signed-off-by: Fons Rademakers <Fons.Rademakers@cern.ch>
Fix race condition in Prefetching when using with a TChain.

Avoid race condition when moving from one TFile to another in a TChain by using a TSemaphore to mark the fact that there are still some prefetch requests in flight. By using this we ensure that the TTreeCache ( i.e. also the TFilePrefetch obj) is moved to the next file only when all in-flight requests are received. There are three things we need to take care of when moving the cache:
- make sure the async thread is not doing any work
- clear all blocks from prefetching and read list
- reset the file pointer in the prefetch obj

This was discovered when testing Prefeching on Alice jobs.  While using it on TChains, we discovered a race condition which was quite hard to replicate on a simple test machine and required some traffic shaping to spot it.

[From Elvin]
Avoid assert in rootcling/genreflex just because there is a user error
Avoid creating an empty output file even in case of early failure
Fix RootCling arguments handling (reset once valid arg is found)

In the arguments check loop reset loop once a valid argument is
found, otherwise in case of an argument with value, the value will
be evaluated in the same iteration causing unexpected arguments
downstream.

E.g.,

    rootcling v4 -f dict.cc -cap cap.cxx <..>

It finds -cap options, reads capaFileName (cap.cxx) and increments
ic (argument counter) by 1. Yet we continue checking arguments
and at the end it pass through undesirabe options filter. Thus it
is added to clingArgs, which is wrong.

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
Signed-off-by: Philippe Canal <pcanal@fnal.gov>
Fix mismatched new/delete
Support case in genreflex when the header are not all first on the command line
Assert only when in debug mode *and* llvmdev mode
The TOC is now always visible.