Why doesn't this quote properly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The "test" brackets in the "AC_CACHE_VAL" shell script test
disappear.  The second clause is entirely quoted, so why do
they disappear?


ALSO:  I'm sure there is a better way to do this.  My desire
is to add either `-R/path/to/libs' or `-Wl,-R/path/to/libs'
to the output for $(library-config ldflags), but only if I
can figure out the right spelling.


AC_DEFUN([AG_TEST_LDFLAGS],[
  AC_MSG_CHECKING([whether runtime library dirs can be specified])
  AC_CACHE_VAL([ag_cv_test_ldflags],[
    ag_cv_test_ldflags=`exec 2> /dev/null
        echo 'int main() { return 0; }' > conftest.$ac_ext
        libs="${LIBS}"
        LIBS="${LIBS} -Wl,-R/tmp"
        if (eval $ac_link) > /dev/null 2>&1
        then ; echo '-Wl,-R' ; exit 0 ; fi
        LIBS="${libs} -R/tmp"
        if (eval $ac_link) > /dev/null 2>&1
        then ; echo '-R' ; exit 0 ; fi
        exit 1`
    if [ $? -ne 0 ]
    then ag_cv_test_ldflags=no
    elif [ -z "$ag_cv_test_ldflags" ]
    then ag_cv_test_ldflags=no
    fi
  ]) # end of CACHE_VAL of ag_cv_test_ldflags
  AC_MSG_RESULT([${ag_cv_test_ldflags}])

  if test "X${ag_cv_test_ldflags}" != Xno
  then
    AG_LDFLAGS="@S|@{ag_cv_test_ldflags}"
    LIBS="@S|@{ag_cv_test_ldflags}@S|@{libdir} @S|@{LIBS}"
  else
    AG_LDFLAGS=''
  fi
  AC_SUBST([AG_LDFLAGS])
  
]) # end of AC_DEFUN of AG_TEST_LDFLAGS


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux