1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00
rofi/configure.ac

137 lines
5.9 KiB
Text
Raw Normal View History

2016-12-25 06:17:34 -05:00
AC_INIT([rofi], [1.3.0], [https://github.com/DaveDavenport/rofi/],[],[https://forum.qtools.org/])
2014-03-17 13:00:09 -04:00
2014-03-18 03:59:42 -04:00
AC_CONFIG_SRCDIR([source/rofi.c])
2014-03-17 13:00:09 -04:00
AC_CONFIG_HEADER([config.h])
dnl ---------------------------------------------------------------------
dnl Setup automake to be silent and in foreign mode.
2015-12-06 11:12:41 -05:00
dnl We want xz distribution
dnl ---------------------------------------------------------------------
2015-03-02 16:23:55 -05:00
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects dist-xz])
2014-03-17 19:11:46 -04:00
AM_SILENT_RULES([yes])
2014-03-17 13:00:09 -04:00
dnl ---------------------------------------------------------------------
dnl Check for compiler
dnl ---------------------------------------------------------------------
2015-02-18 08:00:19 -05:00
AC_PROG_CC([clang gcc cc])
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
dnl C99 standard
dnl ---------------------------------------------------------------------
2015-02-18 08:00:19 -05:00
AC_PROG_CC_C99
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
dnl C to Object rules.
dnl ---------------------------------------------------------------------
AM_PROG_CC_C_O
2014-03-17 13:00:09 -04:00
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
dnl System extensions
dnl ---------------------------------------------------------------------
AC_USE_SYSTEM_EXTENSIONS
dnl ---------------------------------------------------------------------
dnl Static libraries programs
dnl ---------------------------------------------------------------------
AC_PROG_RANLIB
AM_PROG_AR
dnl ---------------------------------------------------------------------
dnl Base CFLAGS
dnl ---------------------------------------------------------------------
2016-02-28 12:33:01 -05:00
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wunreachable-code"
2015-12-31 13:09:25 -05:00
dnl ---------------------------------------------------------------------
dnl Enable source code coverage reporting for GCC
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE(gcov,
[ --enable-gcov Enable source code coverage testing using gcov],
[AM_CFLAGS="${AM_CFLAGS} -coverage"])
2016-11-25 15:47:28 -05:00
AS_IF([test "x${enable_gcov}" = "xyes" ], [AC_DEFINE([ENABLE_GCOV], [1], [Enable gcov profiling])])
2016-03-02 14:12:18 -05:00
AC_ARG_ENABLE(asan,
[ --enable-asan asan],
[AM_CFLAGS="${AM_CFLAGS} -fsanitize=address -fno-omit-frame-pointer -g3"])
2016-11-25 15:47:28 -05:00
AS_IF([test "x${enable_asan}" = "xyes" ], [AC_DEFINE([ENABLE_ASAN], [1], [Enable libasan])])
2016-08-29 15:38:29 -04:00
dnl --------------------------------------------------------------------
dnl DRun dialog
dnl --------------------------------------------------------------------
2016-09-26 05:56:20 -04:00
AC_ARG_ENABLE([drun], AC_HELP_STRING([--disable-drun],[Disable desktop file run dialog]))
AS_IF([test "x${enable_drun}" != "xno"], [AC_DEFINE([ENABLE_DRUN], [1], [Enable desktop file run dialog])])
2015-09-14 03:01:05 -04:00
dnl ---------------------------------------------------------------------
dnl Disable window mode
dnl ---------------------------------------------------------------------
2015-09-20 05:45:28 -04:00
AC_ARG_ENABLE([windowmode], AC_HELP_STRING([--disable-windowmode],[Disable window mode]))
AS_IF([ test "x$enable_windowmode" != "xno"], [AC_DEFINE([WINDOW_MODE],[1],[Enable the window mode])])
2015-09-14 02:57:10 -04:00
dnl ---------------------------------------------------------------------
dnl Output timing information
dnl ---------------------------------------------------------------------
AC_ARG_ENABLE([timings], AC_HELP_STRING([--enable-timings],[Enable timing output]))
AS_IF( [ test "x$enable_timings" = "xyes"], [AC_DEFINE([TIMINGS],[1], [Enable timings output])])
dnl ---------------------------------------------------------------------
dnl Check for C functions.
dnl ---------------------------------------------------------------------
2016-04-14 13:20:37 -04:00
AC_CHECK_FUNC([getline],, AC_MSG_ERROR("Could not find getline in c library"))
AC_CHECK_FUNC([open],, AC_MSG_ERROR("Could not find open in c library"))
AC_CHECK_FUNC([sysconf],, AC_MSG_ERROR("Could not find sysconf"))
2016-04-14 13:20:37 -04:00
AC_CHECK_FUNC([getenv],, AC_MSG_ERROR("Could not find getenv"))
AC_CHECK_FUNC([strtok_r],, AC_MSG_ERROR("Could not find strtok_r"))
AC_CHECK_FUNC([flock],, AC_MSG_ERROR("Could not find flock"))
AC_CHECK_FUNC([ftruncate],,AC_MSG_ERROR("Could not find ftruncate"))
AC_CHECK_FUNC([fcntl],, AC_MSG_ERROR("Could not find fcntl"))
2016-08-23 18:39:56 -04:00
AC_CHECK_FUNC([setlocale],,AC_MSG_ERROR("Could not find setlocale"))
2016-11-04 03:38:35 -04:00
AC_CHECK_FUNC([atexit],, AC_MSG_ERROR("Could not find atexit in c library"))
dnl ---------------------------------------------------------------------
dnl Check dependencies
dnl ---------------------------------------------------------------------
2014-03-17 13:00:09 -04:00
PKG_PROG_PKG_CONFIG
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
2016-03-05 15:01:29 -05:00
dnl PKG_CONFIG based dependencies
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0])
2016-08-31 03:10:30 -04:00
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon >= 0.5.0 xkbcommon-x11 xcb-ewmh xcb-icccm xcb-xrm xcb-randr xcb-xinerama])
2015-09-26 14:34:34 -04:00
PKG_CHECK_MODULES([pango], [pango pangocairo])
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
2015-09-16 10:14:14 -04:00
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0])
2014-03-17 13:00:09 -04:00
2015-12-06 11:12:41 -05:00
dnl ---------------------------------------------------------------------
dnl Add extra compiler flags
dnl ---------------------------------------------------------------------
AC_SUBST([AM_CFLAGS])
2014-03-17 13:00:09 -04:00
2016-01-07 07:38:53 -05:00
AC_CONFIG_FILES([Makefile doc/rofi.doxy])
2014-03-17 13:00:09 -04:00
AC_OUTPUT
dnl -----------------------------------------------
dnl Some output to easily spot if I3 is enabled.
dnl -----------------------------------------------
echo ""
echo "-------------------------------------"
if test x$enable_timings = xyes; then
echo "Timing output: Enabled"
else
echo "Timing output: Disabled"
fi
2016-09-26 05:56:20 -04:00
if test x$enable_drun != xno; then
echo "Desktop File drun dialog Enabled"
2016-08-29 15:38:29 -04:00
else
2016-09-26 05:56:20 -04:00
echo "Desktop File drun dialog Disabled"
2016-08-29 15:38:29 -04:00
fi
if test x$enable_windowmode != xno; then
echo "Window Switcher dialog Enabled"
else
echo "Window Switcher dialog Disabled"
fi
echo "-------------------------------------"
echo "Now type 'make' to build"
echo ""