diff options
-rw-r--r-- | Cmds | 7 | ||||
-rwxr-xr-x | configure | 20 |
2 files changed, 26 insertions, 1 deletions
@@ -29,7 +29,12 @@ ifeq ("$(origin PREFIX)", "command line") INSTX = echo -e " INST\t$(1)" && install -d $(2) && \ install -C $(1) $(2)/$(shell basename $(1)) else - INSTX = echo -e " INST\t$(1)" && install -C $(1) $(2)/$(shell basename $(1)) + ifeq ("$(origin PREFIX)", "file") + INSTX = echo -e " INST\t$(1)" && install -d $(2) && \ + install -C $(1) $(2)/$(shell basename $(1)) + else + INSTX = echo -e " INST\t$(1)" && install -C $(1) $(2)/$(shell basename $(1)) + endif endif MKDIR = echo -e " MKDIR\t$(1)" && mkdir -p $(1) @@ -24,12 +24,24 @@ DISABLE_GEOIP=0 DISABLE_ZLIB=0 ENABLE_DEBUG=0 +PREFIX="/usr/local" +HAVE_PREFIX=0 + usage() { echo "Usage: ./configure [OPTION]... [VAR=VALUE]..." echo "" echo " -h, --help Display this help and exit" echo "" + echo "Installation directories:" + echo " --prefix=PREFIX install architecture-independent files in PREFIX" + echo " [$PREFIX]" + echo "" + echo "By default, \`make install' will install all the files in" + echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify" + echo "an installation prefix other than \`$PREFIX' using \`--prefix'," + echo "for instance \`--prefix=\$HOME'." + echo "" echo "Optional Features:" echo " --disable-libnl Disable libnl support" echo " --disable-geoip Disable geoip support" @@ -48,6 +60,10 @@ while [ $# -gt 0 ] ; do -h|--help) usage ;; + --prefix=*) + PREFIX="${1#*=}" + HAVE_PREFIX=1 + ;; --disable-libnl) DISABLE_LIBNL=1 ;; @@ -794,6 +810,10 @@ else echo "CONFIG_GEOIP=0" >> Config fi +if [ "$HAVE_PREFIX" == "1" ] ; then + echo "PREFIX=$PREFIX" >> Config +fi + echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config echo "CONFIG_TOOLS=$TOOLS" >> Config echo "CONFIG_OK=1" >> Config |