- if test "$GCC" = yes ; then
- dnl newer versions of gcc need -isystem to compile X headers on
- dnl Solaris (which use old style C syntax)
- CPPFLAGS="-isystem /usr/openwin/include $CPPFLAGS"
-
- dnl gcc may use Sun's ld, in which case -rpath gives a confusing
- dnl error message. We have to try both -Wl,-rpath and -Wl,-R:
- saveLdflags="$LDFLAGS"
- LDFLAGS="$saveLdflags -Wl,-rpath,/"
- AC_MSG_CHECKING([if the linker accepts -rpath])
- AC_TRY_LINK(
- [],[],
- [
- AC_MSG_RESULT([yes])
- SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
- WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
- ],[
- AC_MSG_RESULT([no])
- AC_MSG_CHECKING([if the linker accepts -R])
- LDFLAGS="$saveLdflags -Wl,-R,/"
- AC_TRY_LINK(
- [],[],
- [
- AC_MSG_RESULT([yes])
- SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib"
- WXCONFIG_RPATH="-Wl,-R,\$libdir"
- ],[
- AC_MSG_RESULT([no])
- ])
- ])
- LDFLAGS="$saveLdflags"
- else
- SAMPLES_RPATH_FLAG="-R\$(wx_top_builddir)/lib"
- WXCONFIG_RPATH="-R\$libdir"
- fi
+ dnl here we know that Sun CC is not used as we tested for it above,
+ dnl hence we must be using gcc
+
+ dnl newer versions of gcc need -isystem to compile X headers on
+ dnl Solaris (which use old style C syntax)
+ CPPFLAGS="-isystem /usr/openwin/include $CPPFLAGS"
+
+ dnl gcc may use Sun's ld, in which case -rpath gives a confusing
+ dnl error message. We have to try both -Wl,-rpath and -Wl,-R:
+ saveLdflags="$LDFLAGS"
+ LDFLAGS="$saveLdflags -Wl,-rpath,/"
+ AC_MSG_CHECKING([if the linker accepts -rpath])
+ AC_TRY_LINK(
+ [],[],
+ [
+ AC_MSG_RESULT([yes])
+ SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
+ WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
+ ],[
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([if the linker accepts -R])
+ LDFLAGS="$saveLdflags -Wl,-R,/"
+ AC_TRY_LINK(
+ [],[],
+ [
+ AC_MSG_RESULT([yes])
+ SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib"
+ WXCONFIG_RPATH="-Wl,-R,\$libdir"
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+ ])
+ LDFLAGS="$saveLdflags"