diff --git a/configure.ac b/configure.ac index fce5b9ee5..91c74b8ec 100644 --- a/configure.ac +++ b/configure.ac @@ -1079,6 +1079,7 @@ if test -n "$OCTAVE"; then fi AC_MSG_RESULT([${mkoctfile}]) AC_MSG_CHECKING([if ${mkoctfile} works]) + mkoctfile="env - PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH ${mkoctfile}" AS_IF([test "x`${mkoctfile} --version 2>/dev/null | sed -n -e '1p' | sed -n -e '/mkoctfile, version/p'`" != x],[ AC_MSG_RESULT([yes]) ],[ @@ -1093,7 +1094,7 @@ if test -n "$OCTAVE"; then AC_MSG_CHECKING([for Octave preprocessor flags]) OCTAVE_CPPFLAGS= for var in CPPFLAGS INCFLAGS ALL_CXXFLAGS; do - for flag in `env - ${mkoctfile} -p ${var}`; do + for flag in `${mkoctfile} -p ${var}`; do case ${flag} in -D*|-I*) OCTAVE_CPPFLAGS="${OCTAVE_CPPFLAGS} ${flag}";; *) ;; @@ -1105,7 +1106,7 @@ if test -n "$OCTAVE"; then AC_MSG_CHECKING([for Octave compiler flags]) OCTAVE_CXXFLAGS= for var in CXX ALL_CXXFLAGS; do - for flag in `env - ${mkoctfile} -p ${var}`; do + for flag in `${mkoctfile} -p ${var}`; do case ${flag} in -std=*|-g*|-W*) OCTAVE_CXXFLAGS="${OCTAVE_CXXFLAGS} ${flag}";; *) ;; @@ -1125,10 +1126,10 @@ if test -n "$OCTAVE"; then AC_MSG_CHECKING([for Octave linker flags]) OCTAVE_LDFLAGS= for var in OCTLIBDIR; do - OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "-L`env - ${mkoctfile} -p ${var}` + OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "-L`${mkoctfile} -p ${var}` done for var in RDYNAMIC_FLAG RLD_FLAG OCTAVE_LIBS LIBS; do - OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "`env - ${mkoctfile} -p ${var}` + OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "`${mkoctfile} -p ${var}` done AC_MSG_RESULT([$OCTAVE_LDFLAGS])