AC_MSG_RESULT($CXX)
AC_PROG_CXX
+AC_PROG_CXXCPP
### We might want to get or shut warnings.
AC_ARG_ENABLE(warnings,
AC_ARG_ENABLE(pch,
AC_HELP_STRING([--enable-pch],[enable precompiled headers]),,
- enable_pch=yes;)
+ enable_pch=no;)
lyx_pch_comp=no
# set the compiler options correctly.
dnl be used.
AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
AC_ARG_WITH(included-boost,
- [ --without-included-boost do not use the boost lib supplied with LyX],
+ [ --without-included-boost do not use the boost lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found],
[lyx_cv_with_included_boost=$withval
AC_MSG_RESULT([$with_included_boost])],
[lyx_cv_with_included_boost=yes])
break],
[AC_MSG_RESULT(no)])
done])
+
+dnl Extract the single digits from PACKAGE_VERSION and make them available.
+dnl Defines LYX_MAJOR_VERSION, LYX_MINOR_VERSION, LYX_RELEASE_LEVEL, and
+dnl LYX_RELEASE_PATCH, the latter being possibly equal to 0.
+AC_DEFUN([LYX_SET_VERSION_INFO],
+[lyx_major=`echo $PACKAGE_VERSION | sed -e 's/[[.]].*//'`
+ lyx_patch=`echo $PACKAGE_VERSION | sed -e "s/^$lyx_major//" -e 's/^.//'`
+ lyx_minor=`echo $lyx_patch | sed -e 's/[[.]].*//'`
+ lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_minor//" -e 's/^.//'`
+ lyx_release=`echo $lyx_patch | sed -e 's/[[^0-9]].*//'`
+ lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_release//" -e 's/^[[.]]//' -e 's/[[^0-9]].*//'`
+ test "x$lyx_patch" = "x" && lyx_patch=0
+ AC_SUBST(LYX_MAJOR_VERSION,$lyx_major)
+ AC_SUBST(LYX_MINOR_VERSION,$lyx_minor)
+ AC_SUBST(LYX_RELEASE_LEVEL,$lyx_release)
+ AC_SUBST(LYX_RELEASE_PATCH,$lyx_patch)
+])