+AC_ARG_ENABLE(startup-notification,
+ AC_HELP_STRING(
+ [--disable-startup-notification],
+ [disable the startup notification library. [default=enabled]]
+ ),
+ [enable_sn=$enableval],
+ [enable_sn=yes]
+)
+
+if test "$enable_sn" = yes; then
+PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0 >= 0.8],
+ [
+ AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
+ AC_SUBST(LIBSN_CFLAGS)
+ AC_SUBST(LIBSN_LIBS)
+ sn_found=yes
+ ],
+ [
+ sn_found=no
+ ]
+)
+else
+ sn_found=no
+fi
+
+AC_ARG_ENABLE(xcursor,
+ AC_HELP_STRING(
+ [--disable-xcursor],
+ [disable use of the X Cursor library. [default=enabled]]
+ ),
+ [enable_xcursor=$enableval],
+ [enable_xcursor=yes]
+)
+
+if test "$enable_xcursor" = yes; then
+PKG_CHECK_MODULES(XCURSOR, [xcursor],
+ [
+ AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
+ AC_SUBST(XCURSOR_CFLAGS)
+ AC_SUBST(XCURSOR_LIBS)
+ xcursor_found=yes
+ ],
+ [
+ xcursor_found=no
+ ]
+)
+else
+ xcursor_found=no
+fi
+
+AC_ARG_ENABLE(imlib2,
+ AC_HELP_STRING(
+ [--disable-imlib2],
+ [disable use of Imlib2 image library for loading icons. [default=enabled]]
+ ),
+ [enable_imlib2=$enableval],
+ [enable_imlib2=yes]
+)
+
+if test "$enable_imlib2" = yes; then
+PKG_CHECK_MODULES(IMLIB2, [imlib2],
+ [
+ AC_DEFINE(USE_IMLIB2, [1], [Use Imlib2 image library])
+ AC_SUBST(IMLIB2_CFLAGS)
+ AC_SUBST(IMLIB2_LIBS)
+ # export it for the pkg-config file
+ PKG_CONFIG_IMLIB=imlib2
+ AC_SUBST(PKG_CONFIG_IMLIB)
+ imlib2_found=yes
+ ],
+ [
+ imlib2_found=no
+ ]
+)
+else
+ imlib2_found=no
+fi
+
+AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
+
+dnl Check for session management
+X11_SM
+
+#EFENCE_LIBS=-lefence
+EFENCE_LIBS=""
+AC_SUBST(EFENCE_LIBS)
+
+dnl Check for X11 extensions