1dnl =======================================================
2dnl FILE: configure.in.in
3dnl =======================================================
4
5AC_INIT(acinclude.m4) dnl a source file from your sub dir
6
7dnl This is so we can use kde-common
8AC_CONFIG_AUX_DIR(admin)
9
10dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
11unset CDPATH
12
13dnl Checking host/target/build systems, for make, install etc.
14AC_CANONICAL_SYSTEM
15dnl Perform program name transformation
16AC_ARG_PROGRAM
17
18AM_INIT_AUTOMAKE(lineak_xosdplugin,0.9)
19
20AC_PREFIX_DEFAULT(/usr)
21
22if test "x$prefix" = "xNONE"; then
23  prefix=$ac_default_prefix
24  ac_configure_args="$ac_configure_args --prefix $prefix"
25fi
26
27AM_CONFIG_HEADER(config.h)
28AC_CHECK_COMPILERS
29AC_ENABLE_SHARED(yes)
30AC_ENABLE_STATIC(no)
31
32KDE_PROG_LIBTOOL
33all_libraries="$all_libraries $USER_LDFLAGS"
34all_includes="$all_includes $USER_INCLUDES"
35AC_SUBST(all_includes)
36AC_SUBST(all_libraries)
37
38AC_SUBST(AUTODIRS)
39
40AC_LINEAK_CHECK_INCLUDES
41AC_LINEAK_CHECK_LIBS
42AC_LINEAK_FIND_PLUGINDIR
43
44AC_CHECK_HEADERS(xosd.h)
45dnl Check for xosd-config
46AC_PATH_PROG(xosd_config_script, xosd-config, "none")
47	if test "x$xosd_config_script" = "xnone" ; then
48		AC_MSG_RESULT(no)
49		echo "*** xosd-config script not found!  Do you have xosd-dev"
50		echo "*** installed??"
51		AC_MSG_ERROR(xsod-config not found)
52		exit 1
53	else
54		AC_MSG_RESULT(yes)
55		dnl AC_MSG_RESULT($xosd_config_script)
56		XOSD_CFLAGS=`$xosd_config_script --cflags 2>/dev/null`
57		XOSD_LIBS=`$xosd_config_script --libs 2>/dev/null`
58		dnl Replace `main' with a function in -lxosd:
59		AC_CHECK_LIB(xosd, main)
60		AC_SUBST(XOSD_CFLAGS)
61		AC_SUBST(XOSD_LIBS)
62		dnl AC_DEFINE(HAVE_XOSD, 1, [Define whether or not to use xosd])
63	fi
64
65KDE_CREATE_SUBDIRSLIST
66AC_CONFIG_FILES([ Makefile ])
67AC_CONFIG_FILES([ po/Makefile ])
68AC_CONFIG_FILES([ xosd_plugin/Makefile ])
69AC_OUTPUT
70# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
71if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
72  # And if so, warn when they don't match
73  if test "$kde_libs_prefix" != "$given_prefix"; then
74    # And if kde doesn't know about the prefix yet
75    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
76    if test $? -ne 0; then
77      echo ""
78      echo "Warning: you chose to install this package in $given_prefix,"
79      echo "but KDE was found in $kde_libs_prefix."
80      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
81      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
82      echo "Then restart KDE."
83      echo ""
84    fi
85  fi
86fi
87
88if test "$all_tests" = "bad"; then
89  if test ! "$cache_file" = "/dev/null"; then
90    echo ""
91    echo "Please remove the file $cache_file after changing your setup"
92    echo "so that configure will find the changes next time."
93    echo ""
94  fi
95else
96  echo ""
97  echo "Good - your configure finished. Start make now"
98  echo ""
99fi
100