Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
6b67dc7b
Commit
6b67dc7b
authored
Mar 09, 2011
by
Thomas White
Browse files
Better libTIFF test
parent
e33dac04
Changes
3
Hide whitespace changes
Inline
Side-by-side
config.h.in
View file @
6b67dc7b
...
...
@@ -53,6 +53,9 @@
/* Define to 1 if libPNG is available */
#undef HAVE_LIBPNG
/* Define to 1 if you have the `tiff' library (-ltiff). */
#undef HAVE_LIBTIFF
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
...
...
configure
View file @
6b67dc7b
...
...
@@ -7002,15 +7002,59 @@ if test "${with_libtiff+set}" = set; then :
withval
=
$with_libtiff
;
LIBTIFF_CFLAGS
=
"-I
$withval
/include"
LIBTIFF_LIBS
=
"-L
$withval
/lib -ltiff"
have_libtiff
=
true
else
LIBTIFF_LIBS
=
"-ltiff"
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for TIFFOpen in -ltiff"
>
&5
$as_echo_n
"checking for TIFFOpen in -ltiff... "
>
&6
;
}
if
test
"
${
ac_cv_lib_tiff_TIFFOpen
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-ltiff
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char TIFFOpen ();
int
main ()
{
return TIFFOpen ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_lib_tiff_TIFFOpen
=
yes
else
ac_cv_lib_tiff_TIFFOpen
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_tiff_TIFFOpen
"
>
&5
$as_echo
"
$ac_cv_lib_tiff_TIFFOpen
"
>
&6
;
}
if
test
"x
$ac_cv_lib_tiff_TIFFOpen
"
=
x
""
yes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_LIBTIFF 1
_ACEOF
LIBS
=
"-ltiff
$LIBS
"
else
have_libtiff
=
true
fi
$as_echo
"#define HAVE_TIFF 1"
>>
confdefs.h
fi
else
...
...
@@ -7018,6 +7062,13 @@ else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
fi
if
test
x
$have_libtiff
=
xtrue
;
then
:
$as_echo
"#define HAVE_TIFF 1"
>>
confdefs.h
fi
...
...
configure.ac
View file @
6b67dc7b
...
...
@@ -157,13 +157,17 @@ AS_IF([test "x$enable_tiff" != "xno"],
[
LIBTIFF_CFLAGS="-I$withval/include"
LIBTIFF_LIBS="-L$withval/lib -ltiff"
have_libtiff=true
], [
LIBTIFF_LIBS="-ltiff"
AC_CHECK_LIB([tiff], [TIFFOpen], [], [have_libtiff=true])
])
AC_DEFINE([HAVE_TIFF], [1], [Define to 1 if libTIFF is available])
], [
AC_MSG_RESULT([no])
])
AS_IF([test x$have_libtiff = xtrue],
[
AC_DEFINE([HAVE_TIFF], [1], [Define to 1 if libTIFF is available])
])
AC_MSG_CHECKING([whether to use Cairo])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment