From 8fae36cbd1976b26e405e3954b6cd04c3f220e4d Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sat, 6 Apr 2002 13:42:40 +0000 Subject: [PATCH] Improve the life of external extension maintainers by not plaguing them with "./" in absolute paths. Requested by: Andrei, Wez --- acinclude.m4 | 24 +++++++++++++----------- configure.in | 1 + pear/pear.m4 | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 9ce7cbd7e5f..5efc878db58 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -100,9 +100,11 @@ dnl used directly. dnl AC_DEFUN(PHP_ADD_SOURCES_X,[ dnl relative to source- or build-directory? +dnl ac_srcdir/ac_bdir include trailing slash case $1 in - /*[)] ac_srcdir=`echo $ac_n "$1$ac_c"|cut -c 2-`; ac_bdir=$ac_srcdir ;; - *[)] ac_srcdir="$abs_srcdir/$1"; ac_bdir=$1 ;; + "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; + /*[)] ac_srcdir=`echo $ac_n "$1$ac_c"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; + *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; esac dnl how to build .. shared or static? @@ -118,18 +120,18 @@ dnl remove the suffix ac_obj=[$]1 IFS=$old_IFS -dnl append to the array which has been dynamically chosen - $4="[$]$4 [$]ac_bdir/[$]ac_obj.lo" +dnl append to the array which has been dynamically chosen at m4 time + $4="[$]$4 [$]ac_bdir[$]ac_obj.lo" dnl choose the right compiler/flags/etc. for the source-file case $ac_src in - *.c[)] ac_comp="$b_c_pre $3 -I$abs_srcdir/$ac_bdir -I$abs_builddir/$ac_bdir $b_c_meta -c $ac_srcdir/$ac_src -o $ac_bdir/$ac_obj.$b_lo $6$b_c_post" ;; - *.cpp[)] ac_comp="$b_cxx_pre $3 -I$abs_srcdir/$ac_bdir -I$abs_builddir/$ac_bdir $b_cxx_meta -c $ac_srcdir/$ac_src -o $ac_bdir/$ac_obj.$b_lo $6$b_cxx_post" ;; + *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; + *.cpp[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; esac dnl create a rule for the object/source combo cat >>Makefile.objects<