Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/common-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ jobs:
working-directory: ${{ env.ISSM_DIR }}
shell: 'bash'

- name: Check pkg-config
run: |
export PKG_CONFIG_PATH=${{ env.ISSM_DIR }}/lib/pkgconfig
incflags=$(pkg-config --print-errors --cflags-only-I ISSM)
echo $incflags
incdir=$(echo $incflags | awk '{ match($0, /-I(.*)/, m); print m[1]; }')
if [ -f "$incdir/classes/FemModel.h" ]; then
echo "ISSM pkg-config and headers found."
else
echo "ISSM pkg-config and headers not found."
fi
- name: Get MATLAB
if: ${{ inputs.interface == 'matlab' }}
id: setup-matlab
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
--disable-static \
--enable-development \
--enable-debugging \
--enable-install-headers \
--with-numthreads=4 \
--with-matlab-dir=$MATLAB_ROOT \
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu-codipack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
--enable-tape-alloc \
--enable-development \
--enable-debugging \
--enable-install-headers \
--with-numthreads=4 \
--without-kriging \
--without-kml \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubuntu-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
--disable-static \
--enable-development \
--enable-debugging \
--enable-install-headers \
--with-numthreads=4 \
--with-python-version=3.12 \
--with-python-dir=$PYTHON_ROOT \
Expand Down
11 changes: 11 additions & 0 deletions ISSM.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: ISSM
Description: The Ice-Sheet and Sea-level System Model (ISSM)
Version: @VERSION@
Url: @PACKAGE_URL@
Libs: -L${libdir} -lISSMCore -lISSMModules -lISSMOverload
Cflags: -I${includedir} -DHAVE_CONFIG_H
25 changes: 25 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,28 @@ EXTRA_DIST = reconf scripts test m4 examples etc doc packages
SUBDIRS = src

ACLOCAL_AMFLAGS = -I m4

if INSTALL_HEADERS
# install configured headers
issmconfigdir = $(includedir)
issmconfig_HEADERS = \
./config.h

# install configured pkg-config file
issmpcdir = $(libdir)/pkgconfig
issmpc_DATA = \
./ISSM.pc

# install all normal ISSM headers
install-all-issm-headers:
{ \
cd $(abs_srcdir)/src/c; \
hlist=$$(find -name '*.h'); \
for h in $$hlist; do \
$(MKDIR_P) $(DESTDIR)$(includedir)/$$(dirname $$h); \
$(INSTALL_HEADER) $$h $(DESTDIR)$(includedir)/$$h; \
done; \
}
.PHONY: install-all-issm-headers
install-data-local: install-all-issm-headers
endif
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,12 @@ AC_CONFIG_FILES([
src/m/Makefile
])

# pkg-config file
AM_COND_IF([INSTALL_HEADERS], [
AC_CONFIG_FILES([
ISSM.pc
])
])

#End of configure.ac
AC_OUTPUT
11 changes: 11 additions & 0 deletions m4/issm_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ AC_DEFUN([ISSM_OPTIONS],[
ISSMEXT=".exe"
AC_SUBST([ISSMEXT])
dnl }}}
dnl Install Headers {{{
AC_MSG_CHECKING(for installing headers)
AC_ARG_ENABLE(
[install-headers],
AS_HELP_STRING([--enable-install-headers], [install headers and auiliary files to use ISSM as a library]),
[INSTALL_HEADERS_VALUE=${enableval}],
[INSTALL_HEADERS_VALUE=no]
)
AM_CONDITIONAL([INSTALL_HEADERS], [test "x${INSTALL_HEADERS_VALUE}" == "xyes"])
AC_MSG_RESULT([$INSTALL_HEADERS_VALUE])
dnl }}}

dnl OS{{{
IS_MAC=no
Expand Down