configure.ac: internalise CoDiPack/MediPack flags for --enable-ad
* Adds --enable-ad plus --with-{codi,medi}pack-dir options. * When --enable-ad is chosen: - Defines ISSM_USE_AD for conditional compilation. - Injects include paths, library paths and –lcodi/–lmedi into AM_CPPFLAGS, AM_LDFLAGS and LIBS so every sub-dir picks them up. - Automatically disables PETSc to avoid an impossible combo. * Emits AM_CONDITIONAL(USE_AD) for any Makefile.am that still wants it. * Leaves all Makefile.am files untouched; the Spack recipe no longer needs setup_build_environment() hacks.
Doing this upstream means: • Classic builds behave exactly as before. • AD builds work out-of-the-box for Spack, EasyBuild or manual ./configure invocations.
m4/issm_options.m4: new ISSM_ENABLE_AD macro (–enable-ad support)
* Adds ISSM_ENABLE_AD to handle --enable-ad plus --with-{codi,medi}pack-dir. * Macro embeds CoDiPack/MediPack include-dirs, lib-dirs and -lcodi/-lmedi into AM_CPPFLAGS, AM_LDFLAGS, LIBS so no Makefile.am edits are needed. * Automatically drops PETSc when AD is on, defines ISSM_USE_AD, and exposes AM_CONDITIONAL(USE_AD). * configure.ac now simply calls ISSM_ENABLE_AD after ISSM_OPTIONS.
Moves all AD logic out of configure.ac and keeps option handling in the shared macro library.