Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add pkg-config output #967

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config.log
config.status
Makefile.config
HYPRE_config.h
HYPRE.pc
autom4te.cache
src/TAGS
hypre/
Expand Down
13 changes: 11 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,13 @@ checkpar:
echo "Testing SStruct ..."; \
(cd test; ./runtest.sh -atol $(HYPRE_CHECKPAR_TOL) -mpi "$(CHECKRUN)" TEST_sstruct/solvers.sh); \
(cd test; ./checktest.sh); \
(cd test; ./cleantest.sh);
(cd test; ./cleantest.sh);

install: all
@ \
echo "Installing hypre ..."; \
${HYPRE_SRC_TOP_DIR}/config/mkinstalldirs ${HYPRE_LIB_INSTALL} ${HYPRE_INC_INSTALL}; \
${HYPRE_SRC_TOP_DIR}/config/mkinstalldirs \
${HYPRE_LIB_INSTALL} ${HYPRE_INC_INSTALL} ${HYPRE_PKGCONFIG_INSTALL}; \
HYPRE_PWD=`pwd`; \
cd ${HYPRE_BUILD_DIR}/lib; HYPRE_FROMDIR=`pwd`; \
cd $$HYPRE_PWD; \
Expand All @@ -206,9 +207,17 @@ install: all
then \
cp -fR $$HYPRE_FROMDIR/* $$HYPRE_TODIR; \
fi; \
cd ${HYPRE_SRC_TOP_DIR}/config; HYPRE_FROMDIR=`pwd`; \
cd $$HYPRE_PWD; \
cd ${HYPRE_PKGCONFIG_INSTALL}; HYPRE_TODIR=`pwd`; \
if [ "$$HYPRE_FROMDIR" != "$$HYPRE_TODIR" ]; \
then \
cp -fR $$HYPRE_FROMDIR/HYPRE.pc $$HYPRE_TODIR; \
fi; \
cd $$HYPRE_PWD; \
chmod -R a+rX,u+w,go-w ${HYPRE_LIB_INSTALL}; \
chmod -R a+rX,u+w,go-w ${HYPRE_INC_INSTALL}; \
chmod -R a+rX,u+w,go-w ${HYPRE_PKGCONFIG_INSTALL}; \
echo

clean:
Expand Down
10 changes: 10 additions & 0 deletions src/config/HYPRE.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: @HYPRE_NAME@
Description: Parallel solvers for sparse linear systems featuring multigrid methods.
Version: @HYPRE_VERSION@
Libs: -L${libdir} -Wl,-rpath,${libdir} -lHYPRE @LIBS@ @CALIPER_LIBS@ @HYPRE_CUDA_LIBS@ @HYPRE_HIP_LIBS@ @HYPRE_SYCL_LIBS@ @HYPRE_RAJA_LIB_DIR@ @HYPRE_RAJA_LIB@ @HYPRE_KOKKOS_LIB_DIR@ @HYPRE_KOKKOS_LIB@ @HYPRE_UMPIRE_LIB_DIR@ @HYPRE_UMPIRE_LIB@ @HYPRE_MAGMA_LIB_DIR@ @HYPRE_MAGMA_LIB@
Cflags: -I${includedir} @CALIPER_INCLUDE@ @HYPRE_CUDA_INCLUDE@ @HYPRE_HIP_INCL@ @HYPRE_SYCL_INCL@ @HYPRE_RAJA_INCLUDE@ @HYPRE_KOKKOS_INCLUDE@ @HYPRE_UMPIRE_INCLUDE@ @HYPRE_MAGMA_INCLUDE@ @HYPRE_NAP_INCLUDE@
7 changes: 1 addition & 6 deletions src/config/Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ HYPRE_BUILD_DIR = @HYPRE_SRCDIR@/hypre
HYPRE_INSTALL_DIR = @HYPRE_INSTALLDIR@
HYPRE_LIB_INSTALL = @HYPRE_LIBINSTALL@
HYPRE_INC_INSTALL = @HYPRE_INCINSTALL@
HYPRE_PKGCONFIG_INSTALL = @HYPRE_LIBINSTALL@/pkgconfig

HYPRE_LIB_SUFFIX = @HYPRE_LIBSUFFIX@

Expand Down Expand Up @@ -170,12 +171,6 @@ SUPERLU_LIBS = @SUPERLU_LIBS@
DSUPERLU_INCLUDE = @DSUPERLU_INCLUDE@
DSUPERLU_LIBS = @DSUPERLU_LIBS@

##################################################################
## MAGMA options
##################################################################
MAGMA_INCLUDE = @MAGMA_INCLUDE@
MAGMA_LIBS = @MAGMA_LIBS@

##################################################################
## FEI options
##################################################################
Expand Down
1 change: 1 addition & 0 deletions src/config/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3089,5 +3089,6 @@ dnl *********************************************************************
dnl * Define the files to be configured and made
dnl *********************************************************************
AC_CONFIG_FILES([config/Makefile.config])
AC_CONFIG_FILES([config/HYPRE.pc])

AC_OUTPUT
32 changes: 3 additions & 29 deletions src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,6 @@ HYPRE_MAGMA_INCLUDE
HYPRE_MAGMA_LIB_DIR
CALIPER_LIBS
CALIPER_INCLUDE
MAGMA_LIBS
MAGMA_INCLUDE
HYPRE_SYCL_LIBS
HYPRE_SYCL_INCL
HYPRE_HIP_LIBS
Expand Down Expand Up @@ -858,9 +856,6 @@ with_superlu_lib
with_dsuperlu
with_dsuperlu_include
with_dsuperlu_lib
with_magma
with_magma_include
with_magma_lib
with_fei_inc_dir
with_mli
with_MPI
Expand Down Expand Up @@ -4582,30 +4577,6 @@ then :
fi


if test "x$with_magma" = "xyes"; then :

$as_echo "#define HYPRE_USING_MAGMA 1" >>confdefs.h

fi


# Check whether --with-magma-include was given.
if test "${with_magma_include+set}" = set; then :
withval=$with_magma_include; for dmagma_inc_dir in $withval; do
MAGMA_INCLUDE="-I$magma_inc_dir $MAGMA_INCLUDE"
done

fi



# Check whether --with-magma-lib was given.
if test "${with_magma_lib+set}" = set; then :
withval=$with_magma_lib; for magma_lib in $withval; do
MAGMA_LIBS="$MAGMA_LIBS $magma_lib"
done

fi


# Check whether --with-fei-inc-dir was given.
Expand Down Expand Up @@ -11415,6 +11386,8 @@ printf "%s\n" "#define HYPRE_LINUX 1" >>confdefs.h

ac_config_files="$ac_config_files config/Makefile.config"

ac_config_files="$ac_config_files config/HYPRE.pc"


cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -12102,6 +12075,7 @@ do
case $ac_config_target in
"HYPRE_config.h") CONFIG_HEADERS="$CONFIG_HEADERS HYPRE_config.h:config/HYPRE_config.h.in" ;;
"config/Makefile.config") CONFIG_FILES="$CONFIG_FILES config/Makefile.config" ;;
"config/HYPRE.pc") CONFIG_FILES="$CONFIG_FILES config/HYPRE.pc" ;;

*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down