parent
ec7148bb2b
commit
e0da0c9d92
|
@ -11,6 +11,8 @@ MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 config.guess \
|
|||
|
||||
SUBDIRS = libltdl loaders src filters
|
||||
|
||||
bin_SCRIPTS = imlib2-config
|
||||
|
||||
EXTRA_DIST = \
|
||||
imlib2.spec.in \
|
||||
imlib2.spec \
|
||||
|
|
39
configure.in
39
configure.in
|
@ -74,6 +74,30 @@ if test x$ag_cv_func_fopen_binary = xyes; then
|
|||
[Define this if we can use the "b" mode for fopen safely.])
|
||||
fi
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$x_includes" = "x"; then
|
||||
x_includes="/usr/include"
|
||||
fi
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS"
|
||||
x_libs="$X_LIBS $X_EXTRA_LIBS"
|
||||
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="$x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
|
||||
LTLIBOBJS=`echo "$LIBOBJS" | sed 's,.o ,.lo ,g;s,.o$,.lo,'`
|
||||
AC_SUBST(LTLIBOBJS)
|
||||
|
||||
|
@ -116,7 +140,18 @@ echo ""
|
|||
AC_MSG_ERROR([Fatal Error: no FreeType header files detected.])
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl, [
|
||||
], -ldl)
|
||||
|
||||
AC_OUTPUT(Makefile loaders/Makefile src/Makefile test/Makefile \
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(dlopen_libs)
|
||||
|
||||
AC_OUTPUT(imlib2-config Makefile loaders/Makefile src/Makefile test/Makefile \
|
||||
filters/Makefile demo/Makefile dox/Makefile imlib2.spec,
|
||||
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
|
||||
[
|
||||
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h;
|
||||
chmod +x imlib2-config
|
||||
])
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
exec_prefix_set=no
|
||||
|
||||
usage="\
|
||||
Usage: imlib2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo @VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
if test @includedir@ != /usr/include ; then
|
||||
includes=-I@includedir@
|
||||
fi
|
||||
echo $includes @x_cflags@ @x_includes@
|
||||
;;
|
||||
--libs)
|
||||
libdirs=-L@libdir@
|
||||
echo $libdirs -lImlib2 -lttf -lm @dlopen_libs@ @x_ldflags@ @x_libs@
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue