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

AM_INIT_AUTOMAKE(tdegtk3, 0.1)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

# C support
AM_PROG_CC_C_O

# --- Cairo check ---

KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  AC_MSG_WARN([Could not find pkg-config])
])

AC_MSG_CHECKING([for Cairo])

if test -n "$PKGCONFIG"; then
  vers=`$PKGCONFIG cairo --modversion 2>/dev/null`
  if test -n "$vers"
  then
     CAIRO_LIBS="`$PKGCONFIG cairo --libs`"
     CAIRO_RPATH=
     for args in $CAIRO_LIBS; do
          case $args in
            -L*)
               CAIRO_RPATH="$CAIRO_RPATH $args"
               ;;
          esac
     done
     CAIRO_RPATH=`echo $CAIRO_RPATH | $SED -e "s/-L/-R/g"`
     CAIRO_CFLAGS="`$PKGCONFIG cairo --cflags`"

     AC_DEFINE_UNQUOTED(HAVE_CAIRO, 1, [Defines if your system has the Cairo library])
  fi
fi

if test ! "$USE_RPATH" = "yes"; then
    CAIRO_RPATH=
fi

if test -n "$CAIRO_LIBS"
then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([not found])
fi

AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRO_RPATH)

AM_CONDITIONAL(have_openexr, test -n "$CAIRO_LIBS")

# --- End of Cairo check ---

# --- GTK3 check ---

KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  AC_MSG_WARN([Could not find pkg-config])
])

AC_MSG_CHECKING([for GTK3])

if test -n "$PKGCONFIG"; then
  vers=`$PKGCONFIG gtk+-3.0 --modversion 2>/dev/null`
  if test -n "$vers"
  then
     GTK3_LIBS="`$PKGCONFIG gtk+-3.0 --libs`"
     GTK3_RPATH=
     for args in $GTK3_LIBS; do
          case $args in
            -L*)
               GTK3_RPATH="$GTK3_RPATH $args"
               ;;
          esac
     done
     GTK3_RPATH=`echo $GTK3_RPATH | $SED -e "s/-L/-R/g"`
     GTK3_CFLAGS="`$PKGCONFIG gtk+-3.0 --cflags`"
     GTK3_PREFIX=`$PKG_CONFIG --variable=prefix gtk+-3.0`
     GTK3_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
     GTK3_LIBDIR=`$PKG_CONFIG --variable=libdir gtk+-3.0`

     AC_DEFINE_UNQUOTED(HAVE_GTK3, 1, [Defines if your system has the GTK3 library])
  fi
fi

if test ! "$USE_RPATH" = "yes"; then
    GTK3_RPATH=
fi

if test -n "$GTK3_LIBS"
then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([not found])
fi

AC_SUBST(GTK3_LIBS)
AC_SUBST(GTK3_CFLAGS)
AC_SUBST(GTK3_RPATH)
AC_SUBST(GTK3_PREFIX)
AC_SUBST(GTK3_LIBDIR)
AC_SUBST(GTK3_VERSION)

AM_CONDITIONAL(have_openexr, test -n "$GTK3_LIBS")

# --- End of GTK3 check ---

# --- Pango check ---

KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  AC_MSG_WARN([Could not find pkg-config])
])

AC_MSG_CHECKING([for Pango])

if test -n "$PKGCONFIG"; then
  vers=`$PKGCONFIG pango --modversion 2>/dev/null`
  if test -n "$vers"
  then
     PANGO_LIBS="`$PKGCONFIG pango --libs`"
     PANGO_RPATH=
     for args in $PANGO_LIBS; do
          case $args in
            -L*)
               PANGO_RPATH="$PANGO_RPATH $args"
               ;;
          esac
     done
     PANGO_RPATH=`echo $PANGO_RPATH | $SED -e "s/-L/-R/g"`
     PANGO_CFLAGS="`$PKGCONFIG pango --cflags`"

     AC_DEFINE_UNQUOTED(HAVE_PANGO, 1, [Defines if your system has the Pango library])
  fi
fi

if test ! "$USE_RPATH" = "yes"; then
    PANGO_RPATH=
fi

if test -n "$PANGO_LIBS"
then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([not found])
fi

AC_SUBST(PANGO_LIBS)
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_RPATH)

AM_CONDITIONAL(have_openexr, test -n "$PANGO_LIBS")

# --- End of Pango check ---