Commit 11410438 authored by Philip Carns's avatar Philip Carns

partial fix for DESTDIR problem reported by Bill Barth. Use a more

sophisticated method for determining libdir and bindir paths at configure
time.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@379 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 424f30ec
all: checkpath lib/libdarshan-posix.a lib/libdarshan-mpi-io.a lib/libdarshan.so darshan-parser darshan-diff darshan-analyzer darshan-log-params
all: lib/libdarshan-posix.a lib/libdarshan-mpi-io.a lib/libdarshan.so darshan-parser darshan-diff darshan-analyzer darshan-log-params
DESTDIR =
srcdir = @srcdir@
......@@ -13,7 +13,6 @@ libdir = $(DESTDIR)@libdir@
VPATH = $(srcdir)
darshan_lib_path = @darshan_lib_path@
cp_zlib_link_flags = @__CP_ZLIB_LINK_FLAGS@
cp_zlib_include_flags = @__CP_ZLIB_INCLUDE_FLAGS@
......@@ -28,12 +27,6 @@ CFLAGS_MPI_SHARED = -I . -I $(srcdir) @CFLAGS@ @CPPFLAGS@ -D_LARGEFILE64_SOURCE
CC=@MPICC@
LD=@MPICC@
checkpath::
ifneq ($(darshan_lib_path),$(libdir))
@echo "Error: <libdir> must match <prefix>/lib, don't use --libdir!"
@exit 1
endif
lib::
@mkdir -p $@
......
This diff is collapsed.
......@@ -138,13 +138,25 @@ CP_WRAPPERS="-Wl,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-
# ,-u,__wrap___fxstat64,-u,pthread_mutex_lock,-u,pthread_mutex_unlock
if test "x$prefix" = xNONE; then
darshan_lib_path=$ac_default_prefix/lib
darshan_bin_path=$ac_default_prefix/bin
else
darshan_lib_path=$prefix/lib
darshan_bin_path=$prefix/bin
fi
# We need to know the value of the $libdir and $bindir variables so that
# we can reference the correct path in the darshan compiler wrappers.
# Unfortunately, those two variables are not normally evaluated by autoconf.
# They are evaluated at build time using Makefile variable substitutions.
#
# The following logic was copied from mpich2 1.3.1 to resolve the $libdir
# variable at configure time.
#
# Temporarily replace the default NONE value for exec_prefix
# and prefix with the actual, default values.
savePrefix=$prefix
saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_bin_path=$bindir
prefix=$savePrefix
exec_prefix=$saveExecprefix
AC_SUBST(darshan_lib_path)
AC_SUBST(darshan_bin_path)
AC_SUBST(__CP_LOG_PATH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment