File: configure.in

package info (click to toggle)
gmoo 0.5.6-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,388 kB
  • ctags: 2,213
  • sloc: ansic: 18,316; sh: 5,396; makefile: 385; perl: 205; sed: 93; tcl: 30
file content (300 lines) | stat: -rw-r--r-- 7,692 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
dnl Process this file with autoconf to produce a configure script.

dnl Mostly, this file is borrowed form X-Chat

AC_INIT(src/gmoo.c)
AM_CONFIG_HEADER(config.h)

#AM_PROG_LIBTOOL

AM_INIT_AUTOMAKE(gmoo, 0.5.6)
AC_DEFINE_UNQUOTED(IVERSION, "056")
AC_PROG_CC                                                                      

ALL_LINGUAS="nl eo"
AM_GNU_GETTEXT

AC_PATH_PROG(sedpath, sed)
if test "$sedpath" = ""; then
  AC_MSG_ERROR("Cannot find sed: I need it\!")
fi

dnl 
dnl  Command line options
dnl
AC_ARG_ENABLE(zvt,
[
gmoo specific options:
  --disable-zvt           disable use of the zvt terminal widget with gnome],
	zvt=$enableval, zvt=yes)
AC_ARG_ENABLE(perl,
[  --disable-perl          disable use of perl scripting],
        perl=$enableval, perl=yes)
AC_ARG_ENABLE(tcl,
[  --disable-tcl           disable tcl scripting for macros],
	tcl=$enableval, tcl=yes)
AC_ARG_ENABLE(gdk-pixbuf,
[  --disable-gdk-pixbuf    disable gdk-pixbuf for backgrounds],
	pixbuf=$enableval, pixbuf=yes)
AC_ARG_ENABLE(gdk-imlib,
[  --disable-gdk-imlib    disable gdk-imlib for shading backgrounds],
	imlib=$enableval, imlib=yes)
AC_ARG_ENABLE(zlib,
[  --disable-zlib          disable zlib support for compressed logs],
	zlib=$enableval, zlib=yes)
# <tcl8.4hack>
# added this for custom include dir of tcl.h
# by Paul van Tilburg <paulvt@debian.org>
AC_ARG_WITH(tcl,
[  --with-tcl-include=PATH specify a pathname for tcl includes (tcl.h)],
        tclincldir=$withval, tclincldir="")
# </tcl8.4hack>

man_disabled='(manually disabled)'

dnl
dnl  testing for gtk
dnl
AM_PATH_GTK(1.2.3,
	,
	AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?),
	)
dnl Adding the libs etc from gtk
LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"

if test "_$pixbuf" = "_yes"; then
AM_PATH_GDK_PIXBUF(0.9.0,
		   LIBS="$LIBS $GDK_PIXBUF_LIBS"
		   CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
		   pixbuf="yes"
		   pixbuf_msg=\(`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version`\)
		   AC_DEFINE(PIXBUF)
		   ,
		   pixbuf="no"
		   pixbuf_msg="(not foud)")
else
  pixbuf_msg=$man_disabled
fi

if test "_$imlib" = "_yes"; then
AM_PATH_GDK_IMLIB(1.8.2,
		   LIBS="$LIBS $GDK_IMLIB_LIBS"
		   CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
		   imlib="yes"
		   imlib_msg=\(`$IMLIB_CONFIG $imlib_args --version`\)
		   AC_DEFINE(IMLIB)
		   ,
		   imlib="no"
		   imlib_msg="(not foud)")
else
  imlib_msg=$man_disabled
fi

dnl
dnl  Testing for GNOME/GDK_IMLIB for ZVT
dnl
zvt_msg=""
if test "_$zvt" = "_yes"; then
  AC_PATH_PROG(gnomepath, gnome-config)
  AC_MSG_CHECKING(for GNOME availability)
  GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null`
  if test "_$GNOME_CFLAGS" = _ ; then
    gnome=no
    gnome_msg="(gnome not found, turning of zvt support)"
    AC_MSG_RESULT([GNOME not found, disabling zvt])
    zvt="no"
    zvt_msg="(zvt support disabled)"
	  
  else
    gnome=yes
    AC_MSG_RESULT(ok)
  
    AC_MSG_CHECKING(for ZVT compatibility)
    ZVT_LIBS=`$gnomepath zvt --libs 2>/dev/null`
    if test "_$ZVT_LIBS" = "_"; then
      zvt=no
      zvt_msg="(zvt libs not found)"
      AC_MSG_RESULT([ZVT libs not found, building without zvt])
    else
      AC_MSG_RESULT(ok)
      AC_PATH_PROG(imlibpath, imlib-config)
      AC_MSG_CHECKING(for gdk_imlib)
      IMLIB_CFLAGS=`$imlibpath --cflags-gdk 2>/dev/null`
      IMLIB_LIBS=`$imlibpath --libs-gdk 2>/dev/null`
      if test "_$IMLIB_LIBS" = "_" ; then
	AC_MSG_RESULT([not found])
	zvt=no
	zvt_msg="(gdk_imlib not found)"
      else
	AC_MSG_RESULT(yes)
	LIBS="$LIBS $IMLIB_LIBS $ZVT_LIBS"
	CFLAGS="$CFLAGS $IMLIB_CFLAGS $GNOME_CFLAGS"
	AC_DEFINE(ZVT)
	zvt=yes
      fi
    fi
  fi
else
  zvt_msg=$man_disabled
fi

dnl
dnl  testing for perl
dnl
perl_msg=""
if test "$perl" = yes; then
  AC_PATH_PROG(perlpath, perl)
  AC_MSG_CHECKING(for Perl compile flags)
  PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
  if test "_$PERL_CFLAGS" = "_" ; then
    perl="no"
    perl_msg="(perl not found)"
    AC_MSG_RESULT([not found, building without perl])
  else
    PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm//'`
    AC_MSG_RESULT(ok)
    CFLAGS=" $CFLAGS $PERL_CFLAGS"
    LIBS="$LIBS $PERL_LDFLAGS"
    AC_DEFINE(PERL)
  fi
else
  perl_msg=$man_disabled
fi


dnl
dnl  testing for tcl
dnl
tcl_msg=""
if test "$tcl" = yes; then
  AC_CHECK_LIB(tcl8.4, Tcl_Init, tcl_lib=yes, tcl_lib=no)
  if test "$tcl_lib" = "yes"; then
    LIBS="$LIBS -ltcl8.4"
    AC_CHECK_HEADER(tcl.h, tcl_header=yes, tcl_header=no)
    if test "$tcl_header" = "yes"; then
      AC_DEFINE(TCL)
      tcl=yes
    else
      # <tcl8.4hack>
      # added this to enable finding of tcl.h in Debian
      # which is located in /usr/include/tcl.8.4
      # by Paul van Tilburg <paulvt@debian.org>
      echo -n "checking for tcl.h in other include dirs... "
      places="/usr/src/local/tcl8.4 \
	      /import/tcl/include/tcl8.4 \
	      $x_includes/tk \
	      $x_includes \
	      /usr/contrib/include \
	      /usr/local/include/tcl8.4 \
	      /usr/local/include \
	      /usr/include/tcl8.4 \
	      /usr/include \
	      $tclincldir"
	      
      for dir in $places; do
	      if test -r $dir/tcl.h ; then
                 CFLAGS="$CFLAGS -I$dir"
                 echo yes
                 tcl="yes"
		 break
	      fi
      done
      
      if test "tclheader" = "no"; then
         echo "no"
         tcl="no"
         tcl_msg="(tcl header not found)"
      fi
      # </tcl8.4hack>
    fi
  else
    tcl=no
    tcl_msg="(tcl library not found)"
  fi
else
  tcl_msg=$man_disabled
fi


dnl
dnl testing for zlib
dnl
zlib_msg=""
if test "$zlib" = yes; then
  AC_CHECK_LIB(z, gzopen, zlib_lib=yes, zlib_lib=no)
  if test "$zlib_lib" = "yes"; then
    AC_CHECK_HEADER(zlib.h, zlib_header=yes, zlib_header=no)
    if test "$zlib_header" = "yes"; then
      AC_DEFINE(ZLIB)
      LIBS="$LIBS -lz"
    else
      zlib=no
      zlib_msg="(zlib header not found)"
    fi
  else
    zlib=no
    zlib_msg="(zlib library not found)"
  fi
else
  zlib_msg=$man_disabled
fi

dnl Only use -Wall if we have gcc
if test "x$GCC" = "xyes"; then
  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
    CFLAGS="$CFLAGS -Wall"
  fi
  if test "$socks" = yes; then
    CFLAGS="$CFLAGS -w"
  fi
fi

if test "x${prefix}" = "xNONE"; then
  prefix=${ac_default_prefix}
fi
sharedir="$prefix/share"
bindir="$prefix/bin"
AC_DEFINE_UNQUOTED(PREFIX, "$prefix")
AC_DEFINE_UNQUOTED(SHAREDIR, "$sharedir")
AC_DEFINE_UNQUOTED(BINDIR, "$bindir")
AC_DEFINE_UNQUOTED(LOCALEDIR, "$sharedir/locale")

AC_OUTPUT([
src/Makefile
Makefile
share/Makefile
share/pixmaps/Makefile
share/help/Makefile
share/help/C/Makefile
share/help/eo/Makefile
share/help/nl/Makefile
share/scripts/Makefile
intl/Makefile
po/Makefile.in
])

echo
echo gmoo version $VERSION has been configured like:
echo 
echo Building with GTK .................... : yes \(`gtk-config --version`\)
echo Building with gdk-pixbuf ............. : $pixbuf $pixbuf_msg
echo Building with gdk-imlib .............. : $imlib $imlib_msg
echo Building with GNOME .................. : $gnome $gnome_msg
echo Building with ZVT terminal ........... : $zvt $zvt_msg
echo Building with Perl for macros ........ : $perl $perl_msg
echo Building with Tcl for macros ......... : $tcl $tcl_msg
echo Building with zlib for compressed logs : $zlib $zlib_msg
echo Building with Language Support ....... : $USE_NLS
echo Instal binary in ..................... : $bindir
echo Instal shared files in ............... : $sharedir/gmoo
echo 

if test "$zvt" = no; then
  echo "Note: gmoo has a couple of features that won't be avalible if you don't"
  echo "      build with the ZVT terminal..."
  echo
fi

echo to build the program, type \'make\'
echo