File: configure.in

package info (click to toggle)
mousepad 0.2.13-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,340 kB
  • ctags: 287
  • sloc: sh: 9,203; ansic: 3,695; makefile: 145
file content (166 lines) | stat: -rw-r--r-- 5,381 bytes parent folder | download
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
dnl $Id: configure.in.in 26340 2007-11-17 18:30:04Z kelnos $
dnl
dnl Copyright (c) 2005-2007 Erik Harrison <erikharrison@gxfce.org>
dnl Copyright (c) 2003-2007 Benedikt Meurer <benny@xfce.org>
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([mp_version_major], [0])
m4_define([mp_version_minor], [2])
m4_define([mp_version_micro], [13])
m4_define([mp_version_build], [r26361])
m4_define([mp_version_tag], [])
m4_define([mp_version], [mp_version_major().mp_version_minor().mp_version_micro()ifelse(mp_version_tag(), [svn], [mp_version_tag()-mp_version_build()], [mp_version_tag()])])

dnl *******************************************
dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
m4_define([mp_debug_default], [ifelse(mp_version_tag(), [svn], [yes], [minimum])])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2005-2007
        Erik Harrison <erikharrison@gmail.com>])
AC_INIT([Mousepad], [mp_version], [erikharrison@gmail.com])
AC_PREREQ([2.50])
AC_REVISION([$Id: configure.in.in 26340 2007-11-17 18:30:04Z kelnos $])

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()


dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
AC_PROG_LIBTOOL()
AC_PROG_INSTALL()
AC_PROG_INTLTOOL()

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([am ar be ca cs cy de dz el en_GB eo es et eu fi fr gl gu he hu it ja ka ko lt lv mk nb_NO nl pa pl pt_BR pt_PT ro ru sk sq sv ta th tr uk zh_CN zh_TW])

dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=mp_debug_default@:>@]),
  [], [enable_debug=mp_debug_default])
AC_MSG_CHECKING([whether to enable debugging support])
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then

  dnl Check whether the compiler accepts the -errwarn=%all
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -errwarn=%all"
  AC_MSG_CHECKING([whether $CC accepts -errwarn=%all])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -errwarn=%all"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -Werror
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Werror"
  AC_MSG_CHECKING([whether $CC accepts -Werror])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Werror"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -Wall
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall"
  AC_MSG_CHECKING([whether $CC accepts -Wall])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -Wall"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Check whether the compiler accepts the -fno-strict-aliasing
  dnl switch, as certain packages - like Glib - still don't work
  dnl properly with newer compilers.
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -fno-strict-aliasing"
  AC_MSG_CHECKING([whether $CC accepts -fno-strict-aliasing])
  AC_COMPILE_IFELSE(AC_LANG_SOURCE([int x;]), [
    AC_MSG_RESULT([yes])
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -fno-strict-aliasing"
  ], [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"

  dnl Paranoia for --enable-debug=full
  if test x"$enable_debug" = x"full"; then
    PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3"
    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_DEPRECATED -DG_ENABLE_DEBUG"
  fi
else
  dnl Disable object cast checks
  PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"

  dnl Disable all checks for --enable-debug=no
  if test x"$enable_debug" = x"no"; then
    PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  fi
fi
AC_MSG_RESULT([$enable_debug])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
  PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
  AC_MSG_RESULT([yes])
  ;;
*)
  AC_MSG_RESULT([no])
  ;;
esac

dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])

AC_OUTPUT([
Makefile
po/Makefile.in
src/Makefile
])