summaryrefslogtreecommitdiffstats
path: root/kuickshow/configure.in.in
blob: fb1f043275f46cb02ab287257616540df11932c1 (plain)
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
#MIN_CONFIG

#AM_INIT_AUTOMAKE(kuickshow,0.8.2)
 
# my own additions to KDE's version
#
# checking for Imlib...

AC_DEFUN([KDE_FIND_IMLIB_CONFIG],
   [AC_MSG_CHECKING([for imlib-config])

imlib_config_given=NO
ac_imlib_config=""

AC_ARG_WITH(imlib-config,
AC_HELP_STRING([--with-imlib-config=DIR],[directory where "imlib-config" is located]),
[  ac_imlib_config="$withval/imlib-config"
   imlib_config_given=yes
])

if test "$imlib_config_given" = "yes"; then
  if test ! -r $ac_imlib_config; then
    AC_MSG_RESULT(wrong file specified)
    ac_imlib_config=""
  else
    AC_MSG_RESULT($ac_imlib_config)
    LIB_IMLIB=`$ac_imlib_config --libs`
    AC_SUBST(LIB_IMLIB)
  fi
else
  ac_imlib_config=`which imlib-config 2>/dev/null`
  if test -z "$ac_imlib_config"; then
    AC_MSG_RESULT(no)
  else
    dummy=`echo "$ac_imlib_config" | grep '/imlib-config'`
    if test -z "$dummy"; then
      AC_MSG_RESULT(no)
      ac_imlib_config=""
    else
      LIB_IMLIB=`$ac_imlib_config --libs`
      IMLIB_CFLAGS=`$ac_imlib_config --cflags`
      imlib_config=`echo "$LIB_IMLIB" | grep lImlib`
      if test -z "$imlib_config"; then
        AC_MSG_RESULT(no)
        ac_imlib_config=""
      else
        AC_SUBST(LIB_IMLIB)
        AC_SUBST(IMLIB_CFLAGS)
        AC_MSG_RESULT($ac_imlib_config)
      fi
    fi
  fi
fi

])

dnl #### now some kuickshow stuff ###
dnl Check if Imlib is installed properly
KDE_PKG_CHECK_MODULES(IMLIB, imlib >= 1.9.10, 
  LIB_IMLIB=$IMLIB_LIBS
  AC_SUBST(LIB_IMLIB)
,
KDE_FIND_IMLIB_CONFIG
)
 
if test -z "$LIB_IMLIB"; then
dnl  AC_MSG_ERROR([You need to install Imlib 1.x, e.g. http://freshmeat.net/redir/imlib/4385/url_tgz/imlib-1.9.10.tar.gz if your distributor doesn't have a package])
  DO_NOT_COMPILE="$DO_NOT_COMPILE kuickshow"
fi