diff options
author | Reuben Thomas <rrt@sc3d.org> | 2009-08-06 23:19:29 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2009-08-06 23:19:29 +0100 |
commit | c714ad22ce460d1bf68c4795c97eb6c76548091c (patch) | |
tree | 57d348e4a4e4b7f92dde09756f0aa5c870f3fcc4 /m4/ax_with_build_path.m4 | |
parent | c4649d1b50dd1d2a254e41b61342c8c44a0edabf (diff) | |
download | autoconf-archive-c714ad22ce460d1bf68c4795c97eb6c76548091c.tar.gz |
Rename SMR_WITH_BUILD_PATH to AX_WITH_BUILD_PATH.
Diffstat (limited to 'm4/ax_with_build_path.m4')
-rw-r--r-- | m4/ax_with_build_path.m4 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/m4/ax_with_build_path.m4 b/m4/ax_with_build_path.m4 new file mode 100644 index 0000000..f2c76d9 --- /dev/null +++ b/m4/ax_with_build_path.m4 @@ -0,0 +1,40 @@ +# =========================================================================== +# http://www.nongnu.org/autoconf-archive/ax_with_build_path.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_WITH_BUILD_PATH +# +# DESCRIPTION +# +# This macro adds a "--with-build-path" option to the configure script. +# This configure option provides a convenient way to add "-I" options to +# CPPFLAGS and "-L" options to LDFLAGS, at configure time. +# +# Invoking "./configure --with-build-path=DIR" results in "-I DIR/include" +# being added to CPPFLAGS if DIR/include exists, and "-L DIR/lib" being +# added to LDFLAGS if DIR/lib exists. +# +# Separate multiple directories using colons; e.g. +# "--with-build-path=DIR1:DIR2:DIR3". +# +# LICENSE +# +# Copyright (c) 2008 Steve M. Robbins <smr@debian.org> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_WITH_BUILD_PATH], +[ + AC_ARG_WITH([build-path], + [ --with-build-path=DIR build using DIR/include and DIR/lib], + [ + for d in `echo $withval | tr : ' '`; do + test -d $d/include && CPPFLAGS="$CPPFLAGS -I$d/include" + test -d $d/lib && LDFLAGS="$LDFLAGS -L$d/lib" + done + ]) +]) |