]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
cosmetics, incidently fixing bug 1458
[lyx.git] / config / lyxinclude.m4
index a1681c71e4ed7ec71b5c17217eb1afaae3ddf917..1a84d85588169678ed30c774b507668c1ab6ff6b 100644 (file)
@@ -200,6 +200,10 @@ AC_ARG_ENABLE(concept-checks,
         enable_concept_checks=no;
     fi;])
 
+AC_ARG_ENABLE(profiling,
+  AC_HELP_STRING([--enable-profiling],[enable profiling]),,
+  enable_profiling=no;)
+
 ### set up optimization
 AC_ARG_ENABLE(optimization,
   AC_HELP_STRING([--enable-optimization[=value]],[enable compiler optimisation]),,
@@ -230,6 +234,11 @@ if test x$GXX = xyes; then
         CFLAGS="-g $CFLAGS"
        CXXFLAGS="-g $CXXFLAGS"
     fi
+    if test x$enable_profiling = xyes ; then
+        CFLAGS="-pg $CFLAGS"
+        CXXFLAGS="-pg $CXXFLAGS"
+        LDFLAGS="-pg $LDFLAGS"
+    fi
     if test x$enable_warnings = xyes ; then
         case $gxx_version in
             2.*|3.1*|3.2*|3.3*)
@@ -553,8 +562,8 @@ AC_SUBST(FRONTENDS_PROGS)
 ])
 
 
-## Check what kind of packaging should be used at install time. 
-## The default is autodetected. 
+## Check what kind of packaging should be used at install time.
+## The default is autodetected.
 AC_DEFUN([LYX_USE_PACKAGING],
 [AC_MSG_CHECKING([what packaging should be used])
 AC_ARG_WITH(packaging,
@@ -567,20 +576,20 @@ AC_ARG_WITH(packaging,
                   *) lyx_use_packaging=posix;;
   esac])
 AC_MSG_RESULT($lyx_use_packaging)
-case $lyx_use_packaging in 
-   macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout]) 
+case $lyx_use_packaging in
+   macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout])
            default_prefix="/Applications/LyX.app"
           bindir='${prefix}/Contents/MacOS'
           libdir='${prefix}/Contents/Resources'
           datadir='${prefix}/Contents/Resources'
           mandir='${prefix}/Contents/Resources/man' ;;
-  windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) 
+  windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout])
            default_prefix="C:/Program Files/LyX"
           bindir='${prefix}/bin'
           libdir='${prefix}/Resources'
           datadir='${prefix}/Resources'
           mandir='${prefix}/Resources/man' ;;
-    posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout]) 
+    posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout])
           default_prefix=$ac_default_prefix ;;
     *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
 esac