AC_INIT( OsirisLevel1, 2.01 ) m4_include([m4/ax_python.m4]) AC_PROG_CXX AC_PROG_F77(gfortran g77 f77 f90 f95 fort77 fl32) #AC_F77_LIBRARY_LDFLAGS #AC_F77_DUMMY_MAIN #AC_PROG_LN_S AX_PYTHON AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[enable debugging, default: no]), [case "${enableval}" in yes) debug=true ;; no) debug=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac], [debug=false]) #AC_ARG_ENABLE(osirisversion, [--osirisversion=mm.mm.mm], [osirisversion=0.0.0]) #----------------------------------------------------------------------------- # Set the compiler flags #----------------------------------------------------------------------------- if [test x"$debug" == x"true"]; then nxbuildtype=Debug AC_MSG_NOTICE( [Building the DEBUG versions of the library to ${prefix}] ) NXCPP_NXBASE_C_FLAGS="-ansi -fvisibility=hidden -std=c++11 -g -DNXDEBUG -fPIC -pthread -I./" else nxbuildtype=Release AC_MSG_NOTICE( [Building the Release versions of the library to ${prefix}] ) NXCPP_NXBASE_C_FLAGS="-ansi -O3 -fvisibility=hidden -std=c++11 -fPIC -pthread -I./" fi NX_HDF_MACHINE="UNIX386" NXCPP_SHARED_FLAGS=${NXCPP_NXBASE_C_FLAGS} NXFORTRAN_SHARED_FLAGS="-fPIC" # ------------------------------------------------------------------------------------ # Find the hdf "include" directory and export it to the makefiles as @hdfinclude@ # Check we can find the HDF include directory #----------------------------------------------------- #if test -z "${hdfinclude}" ; then # hdfinclude="notfound" # AC_CHECK_FILE( /usr/include/hdf.h, hdfinclude=/usr/include ) # AC_CHECK_FILE( /usr/hdf/include/hdf.h, hdfinclude=/usr/hdf/include ) # AC_CHECK_FILE( /usr/local/include/hdf.h, hdfinclude=/usr/local/include ) # AC_CHECK_FILE( /usr/local/hdf/include/hdf.h, hdfinclude=/usr/local/hdf/include ) # AC_CHECK_FILE( ${prefix}/include/hdf.h, hdfinclude=${prefix}/include ) # AC_CHECK_FILE( ${prefix}/hdf/include/hdf.h, hdfinclude=${prefix}/hdf/include ) #fi #if test "$hdfinclude" = "notfound"; then # AC_MSG_WARN([*** Could not find file ]) # AC_MSG_ERROR([*** either (i) install hdf to a standard location, (ii) change the prefix option so the include subdirectory constains hdf.h, or (iii) add another ac_CHECK_FILE in section HDFINCLUDEPATH in configure.in]) #fi # #----------------------------------------------------------- # Check we can find the HDF library #----------------------------------------------------------- #hdflibdir=`echo ${hdfinclude} | sed 's\/include\/lib\'` #HAVEHDFLIB="No" #AC_CHECK_FILE( ${hdflibdir}/libdf.so, HAVEHDFLIB="Yes" ) #if test "$HAVEHDFLIB" = "No"; then # AC_MSG_WARN( [*** Could not find the HDF library, libdf.so]) # AC_MSG_ERROR([*** Please install the HDF library so it is on the linkers search path.]) #fi #AC_MSG_NOTICE( [The hdf4 headers path can be changed with configure option, hdfinclude = ${hdfinclude}]) #AC_MSG_NOTICE( [The hdf4 library path is set to hdflibdir = ${hdflibdir}]) #------------------------------------------------------------------------- # Export all of the symbols not implicitly exported # Note: # target_cpu, target_vendor and target_os come from AC_CANONICAL_SYSTEM #------------------------------------------------------------------------- hdfinclude=./ AC_SUBST(hdfinclude) AC_SUBST(NXCPP_SHARED_FLAGS) AC_SUBST(NXCPP_NXBASE_C_FLAGS) AC_SUBST(NX_HDF_MACHINE) AC_SUBST(nxbuildtype) AC_SUBST(osirisversion) AC_OUTPUT(Makefile ./osiris_dhs_level1/onyx/onyxcore/makefile.onyx ./osiris_dhs_level1/osirisonyx/makefile.onyxosiris ./osiris_dhs_level1/Level1Services/makefile.level1api ./osiris_dhs_level1/odinosirislib/makefile.odinosirislib ./osiris_dhs_level1/osiris_sasktranif/makefile.osiris_sasktranif ./osiris_dhs_level1/osirisl1python/makefile.osirisl1python ./osiris_dhs_level1/osirisl1python/buildwheel/setup.py ./OsirisLevel2/OsirisLevel2Library/makefile.osirislevel2 )