configure.in 4.71 KB
Newer Older
Arturo Espinosa's avatar
Arturo Espinosa committed
1 2 3
AC_INIT(desktop-properties)

AM_CONFIG_HEADER(config.h)
Arturo Espinosa's avatar
Arturo Espinosa committed
4
AM_INIT_AUTOMAKE(gnome-core, 0.20)
Arturo Espinosa's avatar
Arturo Espinosa committed
5 6 7

AM_MAINTAINER_MODE

Raja R Harinath's avatar
Raja R Harinath committed
8 9
AM_ACLOCAL_INCLUDE(macros)

10 11 12 13 14
dnl
dnl let applications configure for gnome
dnl
gnome_cv_use_gnome=yes

Arturo Espinosa's avatar
Arturo Espinosa committed
15
GNOME_INIT
Arturo Espinosa's avatar
Arturo Espinosa committed
16 17 18 19 20 21 22

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AC_PROG_CXX
23 24
AM_PROG_LEX
AC_PROG_YACC
Arturo Espinosa's avatar
Arturo Espinosa committed
25

26 27
GNOME_X_CHECKS

28 29 30
dnl utility conditional
AM_CONDITIONAL(FALSE, test "x" = "y")

31
ALL_LINGUAS="it ko fr de es no ga sv pt"
Arturo Espinosa's avatar
Arturo Espinosa committed
32 33
AM_GNU_GETTEXT

Tom Tromey's avatar
Tom Tromey committed
34 35
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)

Arturo Espinosa's avatar
Arturo Espinosa committed
36 37 38 39
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

Elliot Lee's avatar
Elliot Lee committed
40 41 42 43 44 45 46 47 48
AC_CHECK_HEADERS(dlfcn.h dl.h)
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
AC_CHECK_FUNCS(dlopen, DL_LIB="",
AC_MSG_ERROR(Dynamic linking is not available on this platform.  Some
apps, like panel, will not run properly.))
])])
AC_SUBST(DL_LIB)

Arturo Espinosa's avatar
Arturo Espinosa committed
49 50 51 52
dnl properties-keyboard
AC_CHECK_HEADERS(X11/extensions/xf86misc.h, XF86MISC_LIBS="-lXxf86misc")
AC_SUBST(XF86MISC_LIBS)

53 54 55 56 57 58
dnl MICO - Magic to extract the relevant information from
dnl        various installed files

AC_MSG_CHECKING(for MICO prefix)
for dir in `(IFS=:; for i in $PATH; do echo $i ; done)` ; do
  if test -f $dir/mico-ld ; then
59
     mico_prefix=`echo $dir | sed 's%/bin$%%' |sed 's%/bin/$%%'`
60 61 62 63 64 65 66 67 68 69
  fi
done

if test ${mico_prefix+set} = set ; then
  AC_MSG_RESULT($mico_prefix)
else
  AC_MSG_RESULT(not found)
  AC_MSG_ERROR(MICO not found)
fi

70 71 72 73 74 75 76 77 78 79 80 81 82
AC_MSG_CHECKING(for MICO version)
if test -f "$mico_prefix/lib/mico-setup.sh"; then
   MICO_VERS=`(. $mico_prefix/lib/mico-setup.sh ; echo $MICOVERSION)`
else
   # Sometimes mico-setup.sh is installed in doc.
   files="`echo $mico_prefix/doc/mico-*/mico-setup.sh`"
   if test "$files" != "$mico_prefix/doc/mico-*/mico-setup.sh"; then
      MICO_VERS=`(set X $files; . $2; echo $MICOVERSION)`
   else
      AC_MSG_ERROR(unknown)
   fi
fi
AC_MSG_RESULT($MICO_VERS)
83

84 85
# We assume here, to keep things simple, that nobody has MICO older
# than 2.0.3.  2.0.4 is not checked for since nobody seems to use it.
86

87
if test $MICO_VERS = 2.0.3 || test $MICO_VERS = 2.0.5; then
88
  MICO_LIBS="-lmicoaux$MICO_VERS -lmico$MICO_VERS -lmicocoss$MICO_VERS -lXt"
89 90 91 92 93
else
  MICO_LIBS="-lmico$MICO_VERS -lmicogtk$MICO_VERS"
  AC_DEFINE(HAVE_MICO_ORB_RUN)
fi

Raja R Harinath's avatar
Raja R Harinath committed
94
for flag in `grep '^eval' < $mico_prefix/bin/mico-ld | sed s%\"%%g` ; do
95 96 97 98
  case $flag in
    -L*)
      MICO_LIBS="$flag $MICO_LIBS"
      ;;
99
    -lm|-ldl|-ldld|-lbsd)
100 101 102 103 104 105 106
      ;;
    -l*)
      MICO_LIBS="$MICO_LIBS $flag"
      ;;
  esac
done
AC_SUBST(MICO_LIBS)
Raja R Harinath's avatar
Raja R Harinath committed
107
AC_SUBST(MICO_VERS)
108

Tom Tromey's avatar
Tom Tromey committed
109
dnl gnome-session
110
dnl $GNOME_HAVE_SM comes from GNOME_X_CHECKS
111
AM_CONDITIONAL(SESSION, test "$GNOME_HAVE_SM" = true)
112 113 114 115 116
AC_ARG_WITH(window-manager,
[  --with-window-manager=NAME
			   Specify default window manager],[
AC_DEFINE_UNQUOTED(WINDOW_MANAGER, "$with_window_manager")])

Martin Baulig's avatar
Martin Baulig committed
117 118
dnl applets/diskusage
GNOME_FILEUTILS_CHECKS
Tom Tromey's avatar
Tom Tromey committed
119

Arturo Espinosa's avatar
Arturo Espinosa committed
120 121 122 123 124 125 126 127 128 129 130
dnl panel/cdplayer
PROGRAMS_PANEL_CDPLAYER=""
AC_CANONICAL_HOST
case "$host" in
*linux*) CDROM_HOST=linux;;
*solaris*) CDROM_HOST=solaris;;
esac
test -n "$CDROM_HOST" && PROGRAMS_PANEL_CDPLAYER=cdplayer
AC_SUBST(CDROM_HOST)
AC_SUBST(PROGRAMS_PANEL_CDPLAYER)

131 132 133 134 135
dnl panel/mixer
PROGRAMS_PANEL_MIXER=""
AC_CHECK_HEADERS(linux/soundcard.h,[PROGRAMS_PANEL_MIXER=mixer],[
  AC_CHECK_HEADERS(machine/soundcard.h, [PROGRAMS_PANEL_MIXER=mixer])])
AC_SUBST(PROGRAMS_PANEL_MIXER)
136 137 138 139

dnl panel/modemlights
AC_CHECK_HEADERS(net/ppp_defs.h,[PROGRAMS_PANEL_MODEMLIGHTS=modemlights])
AC_SUBST(PROGRAMS_PANEL_MODEMLIGHTS)
140
 
Raja R Harinath's avatar
Raja R Harinath committed
141 142 143 144 145 146 147 148 149 150 151 152
dnl help-browser
dnl I found `inet_aton' in -lresolv on solaris
oLIBS="$LIBS"
RES_LIBS=
# the following two are covered by X11 too.  If inet_aton is found in
# plain libc, -lsocket or -lnsl, RES_LIBS will be empty.
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,RES_LIBS="-lresolv")])
AC_SUBST(RES_LIBS)
LIBS="$oLIBS"

153
dnl AC_CONFIG_SUBDIRS(gemvt)
154

Arturo Espinosa's avatar
Arturo Espinosa committed
155 156 157
AC_OUTPUT([
Makefile
po/Makefile.in
158
macros/Makefile
Arturo Espinosa's avatar
Arturo Espinosa committed
159
panel/Makefile
160
applets/Makefile
161
applets/applet-dirs/Makefile
162
applets/gen_util/Makefile
163
applets/batmon/Makefile
164
applets/bussign/Makefile
165
applets/cdplayer/Makefile
166
applets/mixer/Makefile
167
applets/modemlights/Makefile
168
applets/netwatch/Makefile
169
applets/cpuload/Makefile
Robert Norris's avatar
Robert Norris committed
170
applets/netload/Makefile
Radek Doulik's avatar
Radek Doulik committed
171
applets/cpumemusage/Makefile
172
applets/fish/Makefile
173
applets/diskusage/Makefile
174
applets/icewm-pager/Makefile
John Ellis's avatar
John Ellis committed
175 176
applets/drivemount/Makefile
applets/clockmail/Makefile
177
applets/webcontrol/Makefile
gedit's avatar
gedit committed
178
applets/dialer/Makefile
179
core-docs/Makefile
Arturo Espinosa's avatar
Arturo Espinosa committed
180
desktop-links/Makefile
Arturo Espinosa's avatar
Arturo Espinosa committed
181
desktop-properties/Makefile
182
gnome-terminal/Makefile
183
help-browser/Makefile
184
help-browser/gnome-man2html/Makefile
rhlabs's avatar
rhlabs committed
185
help-browser/gnome-info2html/Makefile
186
gmenu/Makefile
Arturo Espinosa's avatar
Arturo Espinosa committed
187 188
pixmaps/Makefile
gsm/Makefile
Tom Tromey's avatar
Tom Tromey committed
189 190
intl/Makefile],
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])