File: configure.in

package info (click to toggle)
libglade2 1:2.6.4-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,280 kB
  • ctags: 494
  • sloc: sh: 9,285; ansic: 4,312; xml: 1,958; makefile: 121
file content (194 lines) | stat: -rw-r--r-- 4,899 bytes parent folder | download | duplicates (2)
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
-*- mode: autoconf -*-
AC_PREREQ(2.52)

m4_define([required_libxml_version], [2.4.10])
m4_define([required_glib_version],   [2.10.0])
m4_define([required_atk_version],    [1.9.0])
m4_define([required_gtk_version],    [2.5.0])

AC_INIT([libglade],[2.6.4],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=libglade])

AC_CONFIG_SRCDIR([test-libglade.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])

GNOME_COMMON_INIT

if test "$enable_debug" != "no"; then
  AC_DEFINE([DEBUG],[1],[enable use of LIBGLADE_DEBUG environment variable])
fi

AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC

dnl XXXX hack to kill off all the libtool tags ...
dnl it isn't like we are using C++ or Fortran.
m4_define([_LT_AC_TAGCONFIG],[])

AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

AM_PATH_GTK_2_0(required_gtk_version)

save_LIBS=$LIBS
LIBS="$GTK_LIBS $LIBS"
AC_CHECK_FUNC(gtk_plug_get_type,
  AC_DEFINE(HAVE_GTK_PLUG,1,[gtk has GtkPlug/GtkSocket implementation]))
LIBS=$save_LIBS

PKG_PROG_PKG_CONFIG

PKG_CHECK_MODULES(LIBGLADE, [dnl
  libxml-2.0 >= required_libxml_version dnl
  atk >= required_atk_version dnl
  gtk+-2.0 >= required_gtk_version dnl
  glib-2.0 >= required_glib_version])

AC_MSG_CHECKING([for native Win32])
case "$host" in
  *-*-mingw*)
    native_win32=yes
    ;;
  *)
    native_win32=no
    ;;
esac
AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = yes)

AC_MSG_CHECKING([for Win32 platform in general])
case "$host" in
  *-*-mingw*|*-*-cygwin*)
    platform_win32=yes
    ;;
  *)
    platform_win32=no
    ;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes)

# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc. GTK+ uses this convention, so libglade must, too.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
# gcc2 uses "-fnative-struct".
if test x"$native_win32" = xyes; then
  if test x"$GCC" = xyes; then
    msnative_struct=''
    AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
    if test -z "$ac_cv_prog_CC"; then
      our_gcc="$CC"
    else
      our_gcc="$ac_cv_prog_CC"
    fi
    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
      2.)
	if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
	  msnative_struct='-fnative-struct'
	fi
	;;
      *)
	if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
	  msnative_struct='-mms-bitfields'
	fi
	;;
    esac
    if test x"$msnative_struct" = x ; then
      AC_MSG_RESULT([no way])
      AC_MSG_WARN([produced libraries will be incompatible with prebuilt GTK+ DLLs])
    else
      CFLAGS="$CFLAGS $msnative_struct"
      AC_MSG_RESULT([${msnative_struct}])
    fi
  fi
fi

GTK_DOC_CHECK(1.0)

dnl gettext stuff ... there is no message catalog for libglade -- libglade
dnl provides translation for the XML files it reads in.
AC_SUBST(GETTEXT_PACKAGE, libglade-2.0)

ALL_LINGUAS=
AM_GLIB_GNU_GETTEXT

dnl stuff to go in the config.h file
AH_TOP(
[#ifndef GLADE_CONFIG_H
#define GLADE_CONFIG_H])
AH_BOTTOM(
[#endif /* GLADE_CONFIG_H */])

# check for a copy of python >= 2.0 with the xml.parsers.expat module.
AM_PATH_PYTHON(2.0, [have_python=true], [have_python=false])
if $have_python; then
  jh_python_check='
import sys
try:
    import xml.parsers.expat
except ImportError:
    sys.exit(1)
'
  AC_MSG_CHECKING([for the Python module xml.parsers.expat])
  if AC_RUN_LOG([$PYTHON -c "$jh_python_check"]); then
    AC_MSG_RESULT([yes])
  else
    AC_MSG_RESULT([no])
    have_python=false
  fi
fi
AM_CONDITIONAL(HAVE_PYTHON, $have_python)

# check for XML catalog
JH_PATH_XML_CATALOG([have_xmlcatalog=true], [have_xmlcatalog=false])
AM_CONDITIONAL(HAVE_XMLCATALOG, $have_xmlcatalog)

dnl add debugging options ...
changequote(,)dnl
if test "x$GCC" = xyes; then
  case " $CFLAGS " in
  *[\	\ ]-Wall[\	\ ]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac

  case " $CFLAGS " in
  *[\	\ ]-std=c9x[\	\ ]*) ;;
  *) CFLAGS="$CFLAGS -std=c9x" ;;
  esac
fi
changequote([,])dnl

AC_CONFIG_FILES([
Makefile
libglade.spec
libglade-zip
glade/Makefile
doc/Makefile
doc/version.xml
tests/Makefile
libglade-2.0.pc
libglade-2.0-uninstalled.pc
])
AC_CONFIG_FILES([libglade-convert], [chmod +x libglade-convert])

AC_OUTPUT

rm -f po/po2tbl.sed

if ! $have_python; then
  echo "*****************************************************"
  echo "  A usable version of python was not found, so the"
  echo "  libglade-convert program was not installed.  This"
  echo "  script requires Python >= 2.0 with expat support."
  echo
  echo "  Some packages require libglade-convert to build"
  echo "  correctly.  If you wish to build one of these"
  echo "  packages, you must install expat and python,"
  echo "  and then rebuild libglade."
  echo "*****************************************************"
  echo
fi