Skip to content

Commit

Permalink
Simpler local build (Works on RHEL8) (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
oysteijo authored Sep 5, 2024
1 parent 22bc411 commit f88c015
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ install: $(target) $(header_files) $(pkg_conf_pc)
@echo 'Copying $(target)'
@strip $(strip_flags) $(DESTDIR)$(PREFIX)/lib/$(target)
@for h in $(header_files); do cp $$h $(DESTDIR)$(PREFIX)/include/ ; echo "Copying $$h"; done
@sudo ldconfig
@if (( $EUID == 0 )); then ldconfig; fi
@if [ -e $(pkg_conf_pc) ]; then mkdir -p $(DESTDIR)$(pkg_config_path); cp $(pkg_conf_pc) $(DESTDIR)$(pkg_config_path) && echo "Copying $(pkg_conf_pc) to $(pkg_config_path)"; fi

.PHONY: uninstall
Expand Down
11 changes: 9 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ then
have_libzip=`pkg-config --exists libzip && echo "true" || echo "false"`
have_pkg_config=true
libzip_libs=`pkg-config --libs libzip`
libzip_cflags=`pkg-config --cflags libzip`
else
printf "No, we do not have pkg-config!\n"
# FIXME: There are some issues here: this requires gcc and an unix-like environment. What about icc, clang etc.? :-(
Expand Down Expand Up @@ -124,8 +125,13 @@ if $have_pkg_config; then
pc_path=$d
break
fi
done
printf "Install path for pkg-config .pc files: %s\n" $pc_path
done;
if [ -z "${PKG_CONFIG_PATH}" ]; then
printf "Install path for pkg-config .pc files: %s\n" $pc_path
else
pc_path=${PKG_CONFIG_PATH}
printf "Install path for pkg-config .pc files: %s (PKG_CONFIG_PATH)\n" $pc_path
fi
fi

if [ ! -d $prefix ]; then
Expand All @@ -149,6 +155,7 @@ echo "use_npz = $use_npz" >>Makefile
if $use_npz; then
echo 'src = $(wildcard *.c)' >>Makefile
echo "LIBS = $libzip_libs" >>Makefile
echo "INCLUDE = $libzip_cflags" >>Makefile
else
echo 'src = npy_array.c' >>Makefile
fi
Expand Down

0 comments on commit f88c015

Please sign in to comment.