X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Flyxinclude.m4;h=2f937339b2dc6c75cbc6b1a52b46dfdcda261af7;hb=7ecfcc91089b878cf364cafa2c9615151fb63b6c;hp=4eb93d755b4b0a6095fc36f5cf10406265494660;hpb=c534500a9b337f23dbf9304f0d80d5c5de0bbcb6;p=lyx.git diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 4eb93d755b..2f937339b2 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -156,6 +156,7 @@ fi AC_MSG_RESULT($CXX) AC_PROG_CXX +AC_PROG_CXXCPP ### We might want to get or shut warnings. AC_ARG_ENABLE(warnings, @@ -215,7 +216,7 @@ esac 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. @@ -714,3 +715,20 @@ do 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) +])