Skip to content
GitLab
Menu
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
27bfe46f
Commit
27bfe46f
authored
Jul 05, 2010
by
Thomas White
Browse files
Add configure options: --disable-tiff and --disable-png
parent
7135bb83
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure
View file @
27bfe46f
...
...
@@ -739,6 +739,8 @@ with_gsl
enable_opencl
enable_gtk
enable_gtktest
enable_png
enable_tiff
with_libtiff
'
ac_precious_vars
=
'build_alias
...
...
@@ -1383,6 +1385,8 @@ Optional Features:
--enable-opencl Enable the use of OpenCL
--disable-gtk Disable GTK+/GLib
--disable-gtktest do not try to compile and run a test GTK+ program
--disable-png Disable the use of libPNG
--disable-tiff Disable the use of libTIFF
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...
...
@@ -5702,34 +5706,72 @@ done
{
$as_echo
"
$as_me
:
$LINENO
: checking libpng"
>
&5
{
$as_echo
"
$as_me
:
$LINENO
: checking whether to use PNG"
>
&5
$as_echo_n
"checking whether to use PNG... "
>
&6
;
}
# Check whether --enable-png was given.
if
test
"
${
enable_png
+set
}
"
=
set
;
then
enableval
=
$enable_png
;
fi
if
test
"x
$enable_png
"
!=
"xno"
;
then
{
$as_echo
"
$as_me
:
$LINENO
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
{
$as_echo
"
$as_me
:
$LINENO
: checking libpng"
>
&5
$as_echo_n
"checking libpng... "
>
&6
;
}
if
$PKG_CONFIG
--atleast-version
1.2.0 libpng
;
then
LIBPNG_VERSION
=
`
$PKG_CONFIG
--modversion
libpng
`
{
$as_echo
"
$as_me
:
$LINENO
: result:
$LIBPNG_VERSION
"
>
&5
if
$PKG_CONFIG
--atleast-version
1.2.0 libpng
;
then
LIBPNG_VERSION
=
`
$PKG_CONFIG
--modversion
libpng
`
{
$as_echo
"
$as_me
:
$LINENO
: result:
$LIBPNG_VERSION
"
>
&5
$as_echo
"
$LIBPNG_VERSION
"
>
&6
;
}
LIBPNG_CFLAGS
=
`
$PKG_CONFIG
--cflags
libpng
`
LIBPNG_LIBS
=
`
$PKG_CONFIG
--libs
libpng
`
LIBPNG_CFLAGS
=
`
$PKG_CONFIG
--cflags
libpng
`
LIBPNG_LIBS
=
`
$PKG_CONFIG
--libs
libpng
`
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_LIBPNG 1
_ACEOF
else
{
$as_echo
"
$as_me
:
$LINENO
: result: Lower than 1.2.0 or not found"
>
&5
else
{
$as_echo
"
$as_me
:
$LINENO
: result: Lower than 1.2.0 or not found"
>
&5
$as_echo
"Lower than 1.2.0 or not found"
>
&6
;
}
fi
else
{
$as_echo
"
$as_me
:
$LINENO
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
fi
{
$as_echo
"
$as_me
:
$LINENO
: checking whether to use TIFF"
>
&5
$as_echo_n
"checking whether to use TIFF... "
>
&6
;
}
# Check whether --enable-tiff was given.
if
test
"
${
enable_tiff
+set
}
"
=
set
;
then
enableval
=
$enable_tiff
;
fi
if
test
"x
$enable_tiff
"
!=
"xno"
;
then
# Check whether --with-libtiff was given.
if
test
"
${
with_libtiff
+set
}
"
=
set
;
then
withval
=
$with_libtiff
;
LIBTIFF_CFLAGS
=
"-I
$withval
/include"
LIBTIFF_LIBS
=
"-L
$withval
/lib -ltiff"
LIBTIFF_LIBS
=
"-L
$withval
/lib -ltiff"
else
LIBTIFF_LIBS
=
"-ltiff"
fi
{
$as_echo
"
$as_me
:
$LINENO
: result: yes"
>
&5
$as_echo
"yes"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
$LINENO
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
fi
CFLAGS
=
"
$CFLAGS
$HDF5_CFLAGS
$GTK_CFLAGS
$GSL_CFLAGS
$OPENCL_CFLAGS
-pthread"
...
...
configure.ac
View file @
27bfe46f
...
...
@@ -91,23 +91,42 @@ AC_CHECK_FUNCS(forkpty,
)
AC_MSG_CHECKING([libpng])
if $PKG_CONFIG --atleast-version 1.2.0 libpng ; then
LIBPNG_VERSION=`$PKG_CONFIG --modversion libpng`
AC_MSG_RESULT($LIBPNG_VERSION)
LIBPNG_CFLAGS=`$PKG_CONFIG --cflags libpng`
LIBPNG_LIBS=`$PKG_CONFIG --libs libpng`
AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
else
AC_MSG_RESULT([Lower than 1.2.0 or not found])
fi
AC_ARG_WITH(libtiff,
[AS_HELP_STRING([--with-libtiff], [specify location of libTIFF library])],
[LIBTIFF_CFLAGS="-I$withval/include"
LIBTIFF_LIBS="-L$withval/lib -ltiff"],
[LIBTIFF_LIBS="-ltiff"])
AC_MSG_CHECKING([whether to use PNG])
AC_ARG_ENABLE([png],
AS_HELP_STRING([--disable-png], [Disable the use of libPNG]))
AS_IF([test "x$enable_png" != "xno"],
[
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([libpng])
if $PKG_CONFIG --atleast-version 1.2.0 libpng ; then
LIBPNG_VERSION=`$PKG_CONFIG --modversion libpng`
AC_MSG_RESULT($LIBPNG_VERSION)
LIBPNG_CFLAGS=`$PKG_CONFIG --cflags libpng`
LIBPNG_LIBS=`$PKG_CONFIG --libs libpng`
AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
else
AC_MSG_RESULT([Lower than 1.2.0 or not found])
fi
],[
AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([whether to use TIFF])
AC_ARG_ENABLE([tiff],
AS_HELP_STRING([--disable-tiff], [Disable the use of libTIFF]))
AS_IF([test "x$enable_tiff" != "xno"],
[
AC_ARG_WITH(libtiff,
[AS_HELP_STRING([--with-libtiff], [specify location of libTIFF library])],
[LIBTIFF_CFLAGS="-I$withval/include"
LIBTIFF_LIBS="-L$withval/lib -ltiff"],
[LIBTIFF_LIBS="-ltiff"])
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
])
CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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