From: Jens Axboe Date: Wed, 29 Apr 2015 16:29:16 +0000 (-0600) Subject: configure: add support for --prefix X-Git-Tag: fio-2.2.8~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=020d54bdf73e691b90b75d3abfd8e6f06cd1f637;p=fio.git configure: add support for --prefix Allows other installation paths that /usr/local Signed-off-by: Jens Axboe --- diff --git a/Makefile b/Makefile index 9b7f27ab..1b312cbd 100644 --- a/Makefile +++ b/Makefile @@ -243,7 +243,7 @@ ifeq ($(CONFIG_TARGET_OS), SunOS) else INSTALL = install endif -prefix = /usr/local +prefix = $(INSTALL_PREFIX) bindir = $(prefix)/bin ifeq ($(CONFIG_TARGET_OS), Darwin) diff --git a/configure b/configure index 8e496b0f..0b9874bf 100755 --- a/configure +++ b/configure @@ -135,11 +135,14 @@ show_help="no" exit_val=0 gfio_check="no" libhdfs="no" +prefix=/usr/local # parse options for opt do optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` case "$opt" in + --prefix=*) prefix="$optarg" + ;; --cpu=*) cpu="$optarg" ;; # esx is cross compiled and cannot be detect through simple uname calls @@ -178,6 +181,7 @@ for opt do done if test "$show_help" = "yes" ; then + echo "--prefix= Use this directory as installation prefix" echo "--cpu= Specify target CPU if auto-detect fails" echo "--cc= Specify compiler to use" echo "--extra-cflags= Specify extra CFLAGS to pass to compiler" @@ -1612,3 +1616,4 @@ echo "CFLAGS+=$CFLAGS" >> $config_host_mak echo "LDFLAGS+=$LDFLAGS" >> $config_host_mak echo "CC=$cc" >> $config_host_mak echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak +echo "INSTALL_PREFIX=$prefix" >> $config_host_mak