File: configure.in

package info (click to toggle)
gmrun 0.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 736 kB
  • ctags: 682
  • sloc: cpp: 1,922; sh: 439; makefile: 39; ansic: 9
file content (102 lines) | stat: -rw-r--r-- 2,543 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(gmrun, 0.9.2)
AM_CONFIG_HEADER(config.h)

AC_ARG_ENABLE(debug,
	[  --enable-debug=[no/yes]	Debugging information == no <--> optimization == yes],,
	enable_debug=no)

if [ ! test "x$enable_debug" != "xyes"]; then
	CFLAGS="-g3 -O0 -DDEBUG"
	CXXFLAGS="-g3 -O0 -DDEBUG"
fi

AC_ARG_ENABLE(system,
    [  --enable-system=[yes/no]  Use "system" libc function to run commands ],,
    enable_system=no)

if [ ! test "x$enable_system" != "xyes"]; then
   CFLAGS="$CFLAGS -DUSE_SYSTEM"
   CXXFLAGS="$CXXFLAGS -DUSE_SYSTEM"
fi

AC_ARG_ENABLE(mtrace,
    [  --enable-mtrace=[no/yes]  Trace memory (de)allocation calls to detect memory leaks ],,
    enable_mtrace=no)

if [ ! test "x$enable_mtrace" != "xyes"]; then
   CFLAGS="$CFLAGS -DMTRACE"
   CXXFLAGS="$CXXFLAGS -DMTRACE"
fi

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_PROG_CXX
AC_PATH_STLPORT_LIB
AC_PATH_STLPORT_INC


AC_CHECK_FUNC( poptGetContext,
              ,
              AC_CHECK_LIB(popt,
                            poptGetContext,
                           LIBS="${LIBS} -lpopt",
                           echo "*** You need to get libpopt ***";exit
                           )
              )

PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.4
                        gobject-2.0 >= 2.0.4
                        gthread-2.0 >= 2.0.4)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.5)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    prefix=/usr/local
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
    PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
  else
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
    PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
    PACKAGE_DATA_DIR="${datadir}/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)

PREFIX=${prefix}
AC_SUBST(PREFIX)

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl

AC_OUTPUT([
Makefile
src/Makefile
config/Makefile
gmrun.spec
])