1 AC_DEFUN([AC_PROG_CC_PIE], [
2 AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [
3 echo 'void f(){}' > conftest.c
4 if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
13 AC_DEFUN([GTK_DOC_CHECK],
15 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
16 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
17 dnl for overriding the documentation installation directory
18 AC_ARG_WITH([html-dir],
19 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
20 [with_html_dir='${datadir}/gtk-doc/html'])
21 HTML_DIR="$with_html_dir"
24 dnl enable/disable documentation building
25 AC_ARG_ENABLE([gtk-doc],
26 AS_HELP_STRING([--enable-gtk-doc],
27 [use gtk-doc to build documentation [[default=no]]]),,
30 if test x$enable_gtk_doc = xyes; then
32 [PKG_CHECK_EXISTS([gtk-doc],,
33 AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
34 [PKG_CHECK_EXISTS([gtk-doc >= $1],,
35 AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
38 AC_MSG_CHECKING([whether to build gtk-doc documentation])
39 AC_MSG_RESULT($enable_gtk_doc)
41 AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
43 AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
44 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])