gnome-control-center/configure.in
Owen Taylor d9e9204352 Fix shell syntax bug in case when MICO is not found.
1998-07-08  Owen Taylor  <otaylor@fresnel.labs.redhat.com>

	* configure.in: Fix shell syntax bug in case when MICO
	is not found.
1998-07-08 19:07:45 +00:00

190 lines
4.7 KiB
Text

AC_INIT(desktop-properties)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnome-core, 0.20)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
dnl
dnl let applications configure for gnome
dnl
gnome_cv_use_gnome=yes
GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AC_PROG_CXX
AM_PROG_LEX
AC_PROG_YACC
GNOME_X_CHECKS
dnl utility conditional
AM_CONDITIONAL(FALSE, test "x" = "y")
ALL_LINGUAS="it ko fr de es no ga sv pt"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
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)
dnl properties-keyboard
AC_CHECK_HEADERS(X11/extensions/xf86misc.h, XF86MISC_LIBS="-lXxf86misc")
AC_SUBST(XF86MISC_LIBS)
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
mico_prefix=`echo $dir | sed 's%/bin$%%' |sed 's%/bin/$%%'`
fi
done
if test x${mico_prefix+set} = xset ; then
AC_MSG_RESULT($mico_prefix)
else
AC_MSG_RESULT(not found)
AC_MSG_ERROR(MICO not found)
fi
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)
# 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.
if test $MICO_VERS = 2.0.3 || test $MICO_VERS = 2.0.5; then
MICO_LIBS="-lmicoaux$MICO_VERS -lmico$MICO_VERS -lmicocoss$MICO_VERS -lXt"
else
MICO_LIBS="-lmico$MICO_VERS -lmicogtk$MICO_VERS"
AC_DEFINE(HAVE_MICO_ORB_RUN)
fi
for flag in `grep '^eval' < $mico_prefix/bin/mico-ld | sed s%\"%%g` ; do
case $flag in
-L*)
MICO_LIBS="$flag $MICO_LIBS"
;;
-lm|-ldl|-ldld|-lbsd)
;;
-l*)
MICO_LIBS="$MICO_LIBS $flag"
;;
esac
done
AC_SUBST(MICO_LIBS)
AC_SUBST(MICO_VERS)
dnl gnome-session
dnl $GNOME_HAVE_SM comes from GNOME_X_CHECKS
AM_CONDITIONAL(SESSION, test "$GNOME_HAVE_SM" = true)
AC_ARG_WITH(window-manager,
[ --with-window-manager=NAME
Specify default window manager],[
AC_DEFINE_UNQUOTED(WINDOW_MANAGER, "$with_window_manager")])
dnl applets/diskusage
GNOME_FILEUTILS_CHECKS
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)
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)
dnl panel/modemlights
AC_CHECK_HEADERS(net/ppp_defs.h,[PROGRAMS_PANEL_MODEMLIGHTS=modemlights])
AC_SUBST(PROGRAMS_PANEL_MODEMLIGHTS)
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"
dnl AC_CONFIG_SUBDIRS(gemvt)
AC_OUTPUT([
Makefile
po/Makefile.in
macros/Makefile
panel/Makefile
applets/Makefile
applets/applet-dirs/Makefile
applets/gen_util/Makefile
applets/batmon/Makefile
applets/bussign/Makefile
applets/cdplayer/Makefile
applets/mixer/Makefile
applets/modemlights/Makefile
applets/netwatch/Makefile
applets/cpuload/Makefile
applets/netload/Makefile
applets/cpumemusage/Makefile
applets/fish/Makefile
applets/diskusage/Makefile
applets/icewm-pager/Makefile
applets/drivemount/Makefile
applets/clockmail/Makefile
applets/webcontrol/Makefile
applets/dialer/Makefile
core-docs/Makefile
desktop-links/Makefile
desktop-properties/Makefile
gnome-terminal/Makefile
help-browser/Makefile
help-browser/gnome-man2html/Makefile
help-browser/gnome-info2html/Makefile
gmenu/Makefile
pixmaps/Makefile
gsm/Makefile
intl/Makefile],
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])