#!/bin/bash # Script to make the FFTW libraries. # Exit Codes found in /usr/include/sysexits.h #set -x # Function to configure, make and then install the Package - contains Package Specific build configuration func_configure_make_install () { cd ${WORK_DIR} export F77=${FC} [ "${BUILD_TYPE}" == "debug" ] && CONFIGURE_DEBUG="--enable-debug" [ ${ACC_ENABLE_FPIC} ] && CONFIGURE_PIC="--with-pic" # Added support for SHARED only library builds, as requested in RT#63875 CONFIGURE_FLAGS=${SHARED_LIB_CONFIGURE_FLAGS} # Fix setting OpenMP configure flag, as per RT#64018 CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-openmp" if [ ! -e ALREADY_BUILT ] ; then ./configure --prefix=${OUTPUT_DIR} \ --disable-dependency-tracking \ --enable-threads \ --includedir=${OUTPUT_DIR}/include \ ${CONFIGURE_FLAGS} \ ${CONFIGURE_PIC} \ ${CONFIGURE_DEBUG} func_print_compiler_linker_flags # Adding ACC_SET_GMAKE_JOBS to build as requested in RT#67548 ${GMAKE} -j ${ACC_SET_GMAKE_JOBS} ${GMAKE} install export RETVAL=$? fi if [ "${ARGUMENTS[1]}" == "-test" ] ; then echo -e "\nBuilding tests for `echo ${PACKAGE_VERSION}`...\n" ${GMAKE} check export RETVAL=$? fi } # Function that contains Package Specific files and directories to be removed func_remove_package () { rm -f ${OUTPUT_DIR}/include/fftw3* rm -f ${OUTPUT_DIR}/bin/fftw-wisdom* rm -f ${OUTPUT_DIR}/share/info/fftw3.info* rm -f ${OUTPUT_DIR}/share/man/man1/fftw-wisdom* rm -f ${OUTPUT_DIR}/lib/libfftw3* rm -f ${OUTPUT_DIR}/lib/pkgconfig/fftw3.pc rm -rf ${OUTPUT_DIR}/lib/cmake/fftw3 rm -rf ${BUILD_TYPE} }