Diff

Differences From Artifact [d472f46fdb]:

To Artifact [6428a9cd91]:


1
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
AC_DEFUN(DC_ASK_STATGRAB, [
#    AC_CHECK_LIB(statgrab, get_memory_stats, AC_DEFINE(HAVE_LIBSTATGRAB, [1], [Have get_memory_stats from libstatgrab]))

  AC_ARG_WITH(libstatgrab, [  --with-libstatgrab      Support for libstatgrab], [
# Specified
    LIBSTATGRAB=$withval
  ], [
# Not specified
    LIBSTATGRABFLAGS=`pkg-config --libs libstatgrab 2>/dev/null`
    LIBSTATGRABCFLAGS=`pkg-config --cflags libstatgrab 2>/dev/null`
    AC_CHECK_LIB(statgrab, get_memory_stats, [
      OLDCPPFLAGS="$CPPFLAGS"
      OLDCFLAGS="$CFLAGS"
      CPPFLAGS="$CPPFLAGS $LIBSTATGRABCFLAGS"
      CFLAGS="$CFLAGS $LIBSTATGRABCFLAGS"
      AC_CHECK_HEADER(statgrab.h, [
        LIBSTATGRAB=yes
      ], [

|
>





<
<
|







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
16
AC_DEFUN(DC_ASK_STATGRAB, [
  LIBSTATGRABFLAGS=`pkg-config --libs libstatgrab 2>/dev/null`
  LIBSTATGRABCFLAGS=`pkg-config --cflags libstatgrab 2>/dev/null`
  AC_ARG_WITH(libstatgrab, [  --with-libstatgrab      Support for libstatgrab], [
# Specified
    LIBSTATGRAB=$withval
  ], [
# Not specified


    AC_CHECK_LIB(statgrab, sg_get_mem_stats, [
      OLDCPPFLAGS="$CPPFLAGS"
      OLDCFLAGS="$CFLAGS"
      CPPFLAGS="$CPPFLAGS $LIBSTATGRABCFLAGS"
      CFLAGS="$CFLAGS $LIBSTATGRABCFLAGS"
      AC_CHECK_HEADER(statgrab.h, [
        LIBSTATGRAB=yes
      ], [
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  		AC_MSG_WARN(Freecolor will be compiled without libstatgrab support)
  		;;
  	*)
  		if test ! "${LIBSTATGRAB}" = "yes"; then
			LIBSTATGRABFLAGS="-L${LIBSTATGRAB}/lib ${LIBSTATGRABFLAGS}"
			LIBSTATGRABCFLAGS="-I${LIBSTATGRAB}/include ${LIBSTATGRABCFLAGS}"
  		fi
		AC_CHECK_LIB(statgrab, get_memory_stats, [
		  OLDCFLAGS="$CFLAGS"
		  OLDCPPFLAGS="$CPPFLAGS"
		  CPPFLAGS="$CPPFLAGS ${LIBSTATGRABCFLAGS}"
		  CFLAGS="$CFLAGS ${LIBSTATGRABCFLAGS}"
  		  AC_CHECK_HEADER(statgrab.h, [
		    AC_DEFINE(HAVE_LIBSTATGRAB_H, [1], [Define to 1 if you have the <statgrab.h> header file.])
		    AC_DEFINE(HAVE_LIBSTATGRAB, [1], [Define to 1 if you have get_memory_stats from -lstatgrab])
		    LDFLAGS="$LDFLAGS $LIBSTATGRABFLAGS"
		    LIBS="$LIBS -lstatgrab"
  		    AC_CHECK_LIB(statgrab, statgrab_drop_privileges, [
		      AC_DEFINE(HAVE_STATGRAB_DROP_PRIVILEGES, [1], [Define to 1 if you have statgrab_drop_privileges from -lstatgrab])
		    ])
		  ], [
		    CFLAGS="$OLDCFLAGS"
		    CPPFLAGS="$OLDCPPFLAGS"
		    AC_MSG_ERROR(Could not find statgrab.h)







|






|
<
|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

43
44
45
46
47
48
49
50
  		AC_MSG_WARN(Freecolor will be compiled without libstatgrab support)
  		;;
  	*)
  		if test ! "${LIBSTATGRAB}" = "yes"; then
			LIBSTATGRABFLAGS="-L${LIBSTATGRAB}/lib ${LIBSTATGRABFLAGS}"
			LIBSTATGRABCFLAGS="-I${LIBSTATGRAB}/include ${LIBSTATGRABCFLAGS}"
  		fi
		AC_CHECK_LIB(statgrab, sg_get_mem_stats, [
		  OLDCFLAGS="$CFLAGS"
		  OLDCPPFLAGS="$CPPFLAGS"
		  CPPFLAGS="$CPPFLAGS ${LIBSTATGRABCFLAGS}"
		  CFLAGS="$CFLAGS ${LIBSTATGRABCFLAGS}"
  		  AC_CHECK_HEADER(statgrab.h, [
		    AC_DEFINE(HAVE_LIBSTATGRAB_H, [1], [Define to 1 if you have the <statgrab.h> header file.])
		    AC_DEFINE(HAVE_LIBSTATGRAB, [1], [Define to 1 if you have sg_get_mem_stats from -lstatgrab])

		    LIBS="$LIBS $LIBSTATGRABFLAGS"
  		    AC_CHECK_LIB(statgrab, statgrab_drop_privileges, [
		      AC_DEFINE(HAVE_STATGRAB_DROP_PRIVILEGES, [1], [Define to 1 if you have statgrab_drop_privileges from -lstatgrab])
		    ])
		  ], [
		    CFLAGS="$OLDCFLAGS"
		    CPPFLAGS="$OLDCPPFLAGS"
		    AC_MSG_ERROR(Could not find statgrab.h)