Skip to content

Commit

Permalink
set rpath for external libsemigroups
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase authored and james-d-mitchell committed Sep 16, 2023
1 parent 8abd3de commit eb71082
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ HPCOMBI_CONSTEXPR_FUN_ARGS = @HPCOMBI_CONSTEXPR_FUN_ARGS@
LIBSEMIGROUPS_HPCOMBI_ENABLED = @LIBSEMIGROUPS_HPCOMBI_ENABLED@
WITH_INCLUDED_LIBSEMIGROUPS = @WITH_INCLUDED_LIBSEMIGROUPS@
SYS_IS_CYGWIN = @SYS_IS_CYGWIN@
LIBSEMIGROUPS_RPATH = @LIBSEMIGROUPS_RPATH@

# sources
KEXT_SOURCES = src/bipart.cpp
Expand Down
2 changes: 1 addition & 1 deletion Makefile.gappkg
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ gen/%.$(GAP_OBJEXT): %.s GNUmakefile
# build rule for linking all object files together into a kernel extension
$(KEXT_SO): $(KEXT_OBJS)
@mkdir -p $(@D)
$(QUIET_GAC)$(GAP_CXX) -o $@ $(GAP_LDFLAGS) $(GAC_LDFLAGS) $(KEXT_OBJS) $(KEXT_LDFLAGS)
$(QUIET_GAC)$(GAP_CXX) -o $@ $(GAP_LDFLAGS) $(GAC_LDFLAGS) $(KEXT_OBJS) $(KEXT_LDFLAGS) $(LIBSEMIGROUPS_RPATH)

# hook into `make clean`
clean: clean-kext
Expand Down
8 changes: 6 additions & 2 deletions m4/ax_check_libsemigroup.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [
[libsemigroups >= $REQUI_LIBSEMIGROUPS_VERSION],
[need_included_libsemigroups=no],
[need_included_libsemigroups=yes])],
[AC_MSG_NOTICE([ignoring flag --with-external-libsemigroups, the Semigroups configure file was created on a system without m4 macros for pkg-config available...])])
[AC_MSG_NOTICE([ignoring flag --with-external-libsemigroups, the Semigroups configure file
was created on a system without m4 macros for pkg-config available...])])
fi
if test "$need_included_libsemigroups" = yes; then
AC_MSG_NOTICE([using included libsemigroups...])
Expand All @@ -27,7 +28,8 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [
[AS_IF(
[test -f libsemigroups/include/libsemigroups.hpp],
[],
[AC_MSG_ERROR([libsemigroups is required, clone or download the repo from https://github.com/libsemigroups/libsemigroups into this directory])])])
[AC_MSG_ERROR([libsemigroups is required, clone or download the repo from
https://github.com/libsemigroups/libsemigroups into this directory])])])
dnl Temporary workaround for compatibility with dev version of
dnl libsemigroups which doesn't contain .VERSION file by default
Expand All @@ -53,6 +55,8 @@ AC_DEFUN([AX_CHECK_LIBSEMIGROUPS], [
else
LIBSEMIGROUPS_VERSION="$(pkg-config --modversion libsemigroups)"
AC_MSG_NOTICE([using external libsemigroups $LIBSEMIGROUPS_VERSION])
PKG_CHECK_VAR([LIBSEMIGROUPS_RPATH], [libsemigroups], [libdir],
[AC_SUBST([LIBSEMIGROUPS_RPATH],[-Wl,-rpath,${LIBSEMIGROUPS_RPATH}])])
fi
AS_IF([test "x$need_included_libsemigroups" = xyes],
Expand Down

0 comments on commit eb71082

Please sign in to comment.