[Build-System] Update configure.ac for macOS updates (#2818)
This is a request to change configure.ac target libraries for Apple Silicon computers and a general cleanup/update for macOS.
Different target on Apple Silicon
Apple has stated that other programs should be installed into /opt for Apple Silicon computers instead of /usr/local. Homebrew installs everything in /opt. Multiple changes were made to handle this.
Added code to auto change the default from /usr/local to /opt for Apple Silicon. All other systems default to /usr/local as before.
Where target libraries were different, code was added to only add the correct libraries to the appropriate architecture. This eliminates a lot of warning message for missing libraries.
Compiler flags were updated to conform to current clang. Obsolete code that can no longer work (for old apple ancient releases or compilers) was removed or replaced.