[go: up one dir, main page]

File: configure.in.in

package info (click to toggle)
showimg 0.9.5-1.3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 21,468 kB
  • ctags: 13,090
  • sloc: ansic: 65,847; cpp: 57,096; sh: 12,726; perl: 2,715; yacc: 2,307; makefile: 549; lex: 286
file content (177 lines) | stat: -rw-r--r-- 5,402 bytes parent folder | download | duplicates (2)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#MIN_CONFIG(3.1)

AM_INIT_AUTOMAKE(showimg,0.9.5)

CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

AC_CHECK_HEADERS(unistd.h sys/param.h floatingpoint.h paths.h)
AC_CHECK_KDEMAXPATHLEN

AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config])
AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config,[yes])

#------------------------------------------------------------------
# Check in .bot if showimg is disabled
#------------------------------------------------------------------
showimg_enabled=yes

#------------------------------------------------------------------
# create showimg_top_srcdir and showimg_top_builddir
#------------------------------------------------------------------
showimg_top_srcdir='$(top_srcdir)/showimg'
showimg_top_builddir='$(top_builddir)/showimg'
AC_SUBST(showimg_top_srcdir)
AC_SUBST(showimg_top_builddir)

#------------------------------------------------------------------
# check for konq_operations.h
#------------------------------------------------------------------
KDE_CHECK_HEADER(konq_operations.h, ,
	AC_MSG_WARN(The file konq_operations.h is needed for ShowImg but is missing. If you use KDE packages please check you have installed the kdebase-devel package.)
	DO_NOT_COMPILE="showimg $DO_NOT_COMPILE"
	showimg_enabled=no
	)
#------------------------------------------------------------------
# check for KIPI
#------------------------------------------------------------------

# check for want_kipi
AC_MSG_CHECKING(if ShowImg should be compiled with KIPI support)
AC_ARG_ENABLE(
	libkipi,
	[  --enable-libkipi        enable KIPI plugin support default=yes],
	[if test "$enableval" = yes; then
		AC_MSG_RESULT(yes)
		want_kipi="yes"
	else
		AC_MSG_RESULT(no)
		want_kipi="no"
		AC_MSG_WARN([KIPI plugin support will not be compiled])
	fi],
	[AC_MSG_RESULT(yes); want_kipi="yes"])

# check for libkipi
if test "$want_kipi" = "yes" ; then
	KDE_CHECK_HEADER(libkipi/interface.h, have_libkipi="yes")
	if test "x$have_libkipi" = "xyes" ;then
		LIBKIPI_CFLAGS=''
		LIBKIPI_LIBS='-lkipi'
		AC_SUBST(LIBKIPI_CFLAGS)
		AC_SUBST(LIBKIPI_LIBS)
		AC_DEFINE(HAVE_KIPI, 1, [If we have enable KIPI])
	fi
fi


#------------------------------------------------------------------
# check for libkexif
#------------------------------------------------------------------
AC_MSG_CHECKING(if ShowImg should be compiled with libkexif support)
AC_ARG_WITH(
	kexif,
	[  --with-kexif            compile the kexif plugins support default=yes],
	[if test "$withval" = yes ; then
		AC_MSG_RESULT(yes)
		want_kexif="yes"
	else
		AC_MSG_RESULT(no)
		want_kexif="no"
	fi],
	[AC_MSG_RESULT(yes); want_kexif="yes"])




if test $want_kexif="yes" ; then
	have_libkexif=no

	#check libkexi >=0.2
	if test "$PKGCONFIGFOUND" = "yes" ; then
		KDE_PKG_CHECK_MODULES(LIBKEXIF, libkexif >= 0.2,
					have_libkexif=yes, have_libkexif=no)
	fi
	
	if test "x$have_libkexif" = "xno"; then
		LIBKEXIF_CFLAGS=""
		LIBKEXIF_LIBS=""
		AC_MSG_RESULT([0.2 not found])
	else
		AC_DEFINE(HAVE_LIBKEXIF, 1, [If we have libkexif])
		AC_DEFINE_UNQUOTED([LIBKEXIF_VERSION], 020, [If we have libkexif 0.2])
		libkexif_version="0.2"
		AC_MSG_RESULT([0.2 found])
	fi

	#check 0.1 <= libkexi <0.2
	if test "x$have_libkexif" = "xno"; then
		KDE_CHECK_HEADER(libkexif/kexif.h, have_libkexif="yes")
		if test "x$have_libkexif" = "xyes"; then
			LIBKEXIF_CFLAGS=""
			LIBKEXIF_LIBS="-lkexif"
			AC_DEFINE(HAVE_LIBKEXIF, 1, [If we have libkexif])
			AC_DEFINE_UNQUOTED([LIBKEXIF_VERSION], 010, [If we have libkexif 0.1])
			libkexif_version="0.1"
			AC_MSG_RESULT([0.1 found])
		else
			LIBKEXIF_CFLAGS=""
			LIBKEXIF_LIBS=""
			AC_MSG_RESULT([0.1 not found])
		fi
	fi
else
	AC_MSG_WARN([libkexif support will not be compiled])
fi

AC_SUBST(LIBKEXIF_CFLAGS)
AC_SUBST(LIBKEXIF_LIBS)


#---------------------------------------------------------
# libexif detection
#---------------------------------------------------------
PKG_CHECK_MODULES([LIBEXIF], [libexif >= 0.5.7],
        have_libexif=yes ,
        have_libexif=no
)

if test "x$have_libexif" = "xyes" ; then
	AC_DEFINE_UNQUOTED([HAVE_LIBEXIF], 1, [If we have libkexif])
fi

AC_SUBST(LIBEXIF_LIBS)
AC_SUBST(LIBEXIF_CFLAGS)


#---------------------------------------------------------
# check for libkexi
#---------------------------------------------------------
AC_MSG_CHECKING(if ShowImg should be compiled with showimgdb support)
AC_ARG_WITH(
	showimgdb,
	[  --with-showimgdb        compile the showimgdb support [default=yes]],
	[if test "$withval" = yes ; then
		AC_MSG_RESULT(yes)
		want_showimgdb="yes"
	else
		AC_MSG_RESULT(no)
		want_showimgdb="no"
	fi],
	[AC_MSG_RESULT(yes); want_showimgdb="yes"])

compile_showimgdb="yes"
if test "x$want_showimgdb" != "xyes" ; then
  compile_showimgdb="no"
fi
AM_CONDITIONAL(compile_showimgdb, test "$compile_showimgdb" = "yes")

if test "x$want_showimgdb" = "xyes" ; then
	LIBKEXIDB_LDDADD='$(showimg_top_builddir)/kexi/kexidb/libshowimgkexidb.la $(showimg_top_builddir)/kexi/kexidb/parser/libshowimgkexidbparser.la $(showimg_top_builddir)/kexi/kexiutils/libshowimgkexiutils.la $(showimg_top_builddir)/showimgdb/libshowimgdb.la'
	LIBKEXIDB_LIBS=''
	LIBKEXIDB_CPPFLAGS='-I$(showimg_top_srcdir)/kexi -I$(showimg_top_srcdir)/showimgdb'
	AC_DEFINE(WANT_LIBKEXIDB, 1, [If we want kexidb support])
else
	AC_MSG_WARN([kexidb/showimgdb support will not be compiled])
fi
AC_SUBST(LIBKEXIDB_LDDADD)
AC_SUBST(LIBKEXIDB_LIBS)
AC_SUBST(LIBKEXIDB_CPPFLAGS)