1dnl
2dnl Extra include and library dirs that someone would like to specify.
3dnl
4AC_ARG_WITH(extra-includes,
5  AC_HELP_STRING([--with-extra-includes=DIR],[Path to other include directories separated by ';']),,
6  with_extra_include_given=no)
7AC_ARG_WITH(extra-libs,
8  AC_HELP_STRING([--with-extra-libs=DIR],[Path to other library directories separated by ';']),,
9  with_extra_libs_given=no)
10  EXTRA_CFLAGS=
11
12  USER_CFLAGS="$CFLAGS"
13  USER_CPPFLAGS="$CPPFLAGS"
14  USER_CXXFLAGS="$CXXFLAGS"
15  USER_LDFLAGS="$LDFLAGS"
16
17  if test "$with_extra_includes" != ""; then
18    DIRS=`echo $with_extra_includes | cut -d '=' -f 2 | sed 's,;, -I,g'`
19    EXTRA_CFLAGS="-I$DIRS"
20    CFLAGS="$CFLAGS -I$DIRS"
21    CXXFLAGS="$CXXFLAGS -I$DIRS"
22    CPPFLAGS="$CPPFLAGS -I$DIRS"
23  fi
24
25  EXTRA_LDFLAGS=
26  if test "$with_extra_libs" != ""; then
27    DIRS=`echo $with_extra_libs | cut -d '=' -f 2 | sed 's,;, -L,g'`
28    EXTRA_LDFLAGS="-L$DIRS"
29    LDFLAGS="$LDFLAGS -L$DIRS"
30  fi
31
32  LDFLAGS_RPATHS=
33dnl  # Don't use rpaths. Most users and distros consider them evil.
34dnl  if test "$MINGW" != "1"; then
35dnl    LDFLAGS_RPATHS=`echo " $LDFLAGS" | sed 's: -L: -Wl,--rpath :g'`
36dnl  fi
37
38AC_SUBST(EXTRA_CFLAGS)
39AC_SUBST(EXTRA_LDFLAGS)
40
41AC_SUBST(USER_CFLAGS)
42AC_SUBST(USER_CPPFLAGS)
43AC_SUBST(USER_CXXFLAGS)
44AC_SUBST(USER_LDFLAGS)
45AC_SUBST(LDFLAGS_RPATHS)
46