Modify it to adjust Tizen IVI enviroment
[platform/upstream/kmscon.git] / configure.ac
index e25536f..eb3020f 100644 (file)
@@ -6,7 +6,7 @@
 AC_PREREQ(2.68)
 
 AC_INIT([kmscon],
-        [7],
+        [8],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
         [kmscon],
         [http://www.freedesktop.org/wiki/Software/kmscon])
@@ -44,6 +44,26 @@ LT_PREREQ(2.2)
 LT_INIT
 
 #
+# Required pkg-config dependencies
+#
+
+PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon])
+AC_SUBST(XKBCOMMON_CFLAGS)
+AC_SUBST(XKBCOMMON_LIBS)
+
+PKG_CHECK_MODULES([TSM], [libtsm])
+AC_SUBST(TSM_CFLAGS)
+AC_SUBST(TSM_LIBS)
+
+PKG_CHECK_MODULES([UDEV], [libudev >= 172])
+AC_SUBST(UDEV_CFLAGS)
+AC_SUBST(UDEV_LIBS)
+
+PKG_CHECK_MODULES([DRM], [libdrm])
+AC_SUBST(DRM_CFLAGS)
+AC_SUBST(DRM_LIBS)
+
+#
 # pkg-config dependencies
 # This unconditionally checks for all dependencies even if they are disabled. We
 # later look whether all required depedencies are met and finish the
@@ -54,31 +74,11 @@ LT_INIT
 # ourself.
 #
 
-PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
-                  [have_xkbcommon=yes], [have_xkbcommon=no])
-AC_SUBST(XKBCOMMON_CFLAGS)
-AC_SUBST(XKBCOMMON_LIBS)
-
 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
                   [have_systemd=yes], [have_systemd=no])
 AC_SUBST(SYSTEMD_CFLAGS)
 AC_SUBST(SYSTEMD_LIBS)
 
-PKG_CHECK_MODULES([UDEV], [libudev >= 172],
-                  [have_udev=yes], [have_udev=no])
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
-
-PKG_CHECK_MODULES([DBUS], [dbus-1],
-                  [have_dbus=yes], [have_dbus=no])
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES([DRM], [libdrm],
-                  [have_drm=yes], [have_drm=no])
-AC_SUBST(DRM_CFLAGS)
-AC_SUBST(DRM_LIBS)
-
 PKG_CHECK_MODULES([GBM], [gbm],
                   [have_gbm=yes], [have_gbm=no])
 AC_SUBST(GBM_CFLAGS)
@@ -104,11 +104,6 @@ PKG_CHECK_MODULES([PIXMAN], [pixman-1],
 AC_SUBST(PIXMAN_CFLAGS)
 AC_SUBST(PIXMAN_LIBS)
 
-PKG_CHECK_MODULES([TSM], [libtsm],
-                  [have_tsm=yes], [have_tsm=no])
-AC_SUBST(TSM_CFLAGS)
-AC_SUBST(TSM_LIBS)
-
 #
 # Parse arguments
 # This parses all arguments that are given via "--enable-XY" or "--with-XY" and
@@ -126,42 +121,6 @@ if test "x$enable_all" = "x" ; then
 fi
 AC_MSG_RESULT([$enable_all])
 
-# eloop
-AC_MSG_CHECKING([whether user wants eloop])
-AC_ARG_ENABLE([eloop],
-              [AS_HELP_STRING([--enable-eloop],
-                              [build eloop library])])
-if test "x$enable_all" = "xyes" ; then
-        enable_eloop="yes"
-elif test "x$enable_eloop" = "x" ; then
-        enable_eloop="no (default)"
-fi
-AC_MSG_RESULT([$enable_eloop])
-
-# uterm
-AC_MSG_CHECKING([whether user wants uterm])
-AC_ARG_ENABLE([uterm],
-              [AS_HELP_STRING([--enable-uterm],
-                              [build uterm library])])
-if test "x$enable_all" = "xyes" ; then
-        enable_uterm="yes"
-elif test "x$enable_uterm" = "x" ; then
-        enable_uterm="no (default)"
-fi
-AC_MSG_RESULT([$enable_uterm])
-
-# kmscon
-AC_MSG_CHECKING([whether user wants kmscon])
-AC_ARG_ENABLE([kmscon],
-              [AS_HELP_STRING([--disable-kmscon],
-                              [do not build kmscon])])
-if test "x$enable_all" = "xyes" ; then
-        enable_kmscon="yes"
-elif test "x$enable_kmscon" = "x" ; then
-        enable_kmscon="yes (default)"
-fi
-AC_MSG_RESULT([$enable_kmscon])
-
 # debug
 AC_MSG_CHECKING([whether to build with debugging on])
 AC_ARG_ENABLE([debug],
@@ -198,30 +157,6 @@ elif test "x$enable_multi_seat" = "x" ; then
 fi
 AC_MSG_RESULT([$enable_multi_seat])
 
-# hotplug
-AC_MSG_CHECKING([whether user wants udev for device hotplug support])
-AC_ARG_ENABLE([hotplug],
-              [AS_HELP_STRING([--enable-hotplug],
-                              [enable device hotplug support with udev])])
-if test "x$enable_all" = "xyes" ; then
-        enable_hotplug="yes"
-elif test "x$enable_hotplug" = "x" ; then
-        enable_hotplug="yes (default)"
-fi
-AC_MSG_RESULT([$enable_hotplug])
-
-# eloop-dbus
-AC_MSG_CHECKING([whether user wants eloop dbus support])
-AC_ARG_ENABLE([eloop-dbus],
-              [AS_HELP_STRING([--enable-eloop-dbus],
-                              [enable eloop dbus support])])
-if test "x$enable_all" = "xyes" ; then
-        enable_eloop_dbus="yes"
-elif test "x$enable_eloop_dbus" = "x" ; then
-        enable_eloop_dbus="no (default)"
-fi
-AC_MSG_RESULT([$enable_eloop_dbus])
-
 # video backends
 AC_MSG_CHECKING([which video backends the user wants])
 AC_ARG_WITH([video],
@@ -392,34 +327,6 @@ else
         optimizations_missing="enable-optimizations"
 fi
 
-# eloop-dbus
-eloop_dbus_avail=no
-eloop_dbus_missing=""
-if test ! "x$enable_eloop_dbus" = "xno" ; then
-        eloop_dbus_avail=yes
-        if test "x$have_dbus" = "xno" ; then
-                eloop_dbus_avail=no
-                eloop_dbus_missing="libdbus"
-        fi
-
-        if test "x$eloop_dbus_avail" = "xno" ; then
-                if test "x$enable_eloop_dbus" = "xyes" ; then
-                        AC_ERROR([missing for eloop-dbus: $eloop_dbus_missing])
-                fi
-        fi
-else
-        eloop_dbus_missing="enable-eloop-dbus"
-fi
-
-# eloop
-eloop_avail=no
-eloop_missing=""
-if test ! "x$enable_eloop" = "xno" ; then
-        eloop_avail=yes
-else
-        eloop_missing="enable-eloop"
-fi
-
 # video fbdev
 video_fbdev_avail=no
 video_fbdev_missing=""
@@ -435,16 +342,6 @@ video_drm2d_avail=no
 video_drm2d_missing=""
 if test ! "x$enable_video_drm2d" = "xno" ; then
         video_drm2d_avail=yes
-        if test "x$have_drm3d" = "xno" ; then
-                video_drm2d_avail=no
-                video_drm2d_missing="libdrm3d"
-        fi
-
-        if test "x$video_drm2d_avail" = "xno" ; then
-                if test "x$enable_video_drm2d" = "xyes" ; then
-                        AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
-                fi
-        fi
 else
         video_drm2d_missing="enable-video-drm2d"
 fi
@@ -454,10 +351,6 @@ video_drm3d_avail=no
 video_drm3d_missing=""
 if test ! "x$enable_video_drm3d" = "xno" ; then
         video_drm3d_avail=yes
-        if test "x$have_drm3d" = "xno" ; then
-                video_drm3d_avail=no
-                video_drm3d_missing="libdrm3d,$video_drm3d_missing"
-        fi
         if test "x$have_gbm" = "xno" ; then
                 video_drm3d_avail=no
                 video_drm3d_missing="libgbm,$video_drm3d_missing"
@@ -480,15 +373,6 @@ else
         video_drm3d_missing="enable-video-drm3d"
 fi
 
-# uterm
-uterm_avail=no
-uterm_missing=""
-if test ! "x$enable_uterm" = "xno" ; then
-        uterm_avail=yes
-else
-        uterm_missing="enable-uterm"
-fi
-
 # multi-seat
 multi_seat_avail=no
 multi_seat_missing=""
@@ -508,25 +392,6 @@ else
         multi_seat_missing="enable-multi-seat"
 fi
 
-# hotplug
-hotplug_avail=no
-hotplug_missing=""
-if test ! "x$enable_hotplug" = "xno" ; then
-        hotplug_avail=yes
-        if test "x$have_udev" = "xno" ; then
-                hotplug_avail=no
-                hotplug_missing="libudev"
-        fi
-
-        if test "x$hotplug_avail" = "xno" ; then
-                if test "x$enable_hotplug" = "xyes" ; then
-                        AC_ERROR([missing for hotplug-support: $hotplug_missing])
-                fi
-        fi
-else
-        hotplug_missing="enable-hotplug"
-fi
-
 # renderer bbulk
 renderer_bbulk_avail=no
 renderer_bbulk_missing=""
@@ -616,49 +481,10 @@ session_terminal_avail=no
 session_terminal_missing=""
 if test ! "x$enable_session_terminal" = "xno" ; then
         session_terminal_avail=yes
-        if test "x$have_tsm" = "xno" ; then
-                session_terminal_avail=no
-                session_terminal_missing="libtsm"
-        fi
-
-        if test "x$session_terminal_avail" = "xno" ; then
-                if test "x$enable_session_terminal" = "xyes" ; then
-                        AC_ERROR([missing for session-terminal: $session_terminal_missing])
-                fi
-        fi
 else
         session_terminal_missing="enable-session-terminal"
 fi
 
-# kmscon
-kmscon_avail=no
-kmscon_missing=""
-if test ! "x$enable_kmscon" = "xno" ; then
-        kmscon_avail=yes
-        if test "x$eloop_avail" = "xno" ; then
-                kmscon_avail=no
-                kmscon_missing="$eloop_missing,$kmscon_missing"
-        fi
-
-        if test "x$have_tsm" = "xno" ; then
-                kmscon_avail=no
-                kmscon_missing="libtsm,$kmscon_missing"
-        fi
-
-        if test "x$uterm_avail" = "xno" ; then
-                kmscon_avail=no
-                kmscon_missing="$uterm_missing,$kmscon_missing"
-        fi
-
-        if test "x$kmscon_avail" = "xno" ; then
-                if test "x$enable_kmscon" = "xyes" ; then
-                        AC_ERROR([missing for kmscon: $kmscon_missing])
-                fi
-        fi
-else
-        kmscon_missing="enable-kmscon"
-fi
-
 #
 # Enable all required modules
 # We now know which modules can be built by checking the *_avail variables set
@@ -667,16 +493,6 @@ fi
 # needs them. This is done top-down of course.
 #
 
-# kmscon
-kmscon_enabled=no
-if test "x$kmscon_avail" = "xyes" ; then
-        if test "x${enable_kmscon% *}" = "xyes" ; then
-                kmscon_enabled=yes
-                enable_eloop=yes
-                enable_uterm=yes
-        fi
-fi
-
 # session terminal
 session_terminal_enabled=no
 if test "x$session_terminal_avail" = "xyes" ; then
@@ -733,14 +549,6 @@ if test "x$renderer_bbulk_avail" = "xyes" ; then
         fi
 fi
 
-# hotplug
-hotplug_enabled=no
-if test "x$hotplug_avail" = "xyes" ; then
-        if test "x${enable_hotplug% *}" = "xyes" ; then
-                hotplug_enabled=yes
-        fi
-fi
-
 # multi-seat
 multi_seat_enabled=no
 if test "x$multi_seat_avail" = "xyes" ; then
@@ -749,14 +557,6 @@ if test "x$multi_seat_avail" = "xyes" ; then
         fi
 fi
 
-# uterm
-uterm_enabled=no
-if test "x$uterm_avail" = "xyes" ; then
-        if test "x${enable_uterm% *}" = "xyes" ; then
-                uterm_enabled=yes
-        fi
-fi
-
 # video drm3d
 video_drm3d_enabled=no
 if test "x$video_drm3d_avail" = "xyes" ; then
@@ -781,22 +581,6 @@ if test "x$video_fbdev_avail" = "xyes" ; then
         fi
 fi
 
-# eloop
-eloop_enabled=no
-if test "x$eloop_avail" = "xyes" ; then
-        if test "x${enable_eloop% *}" = "xyes" ; then
-                eloop_enabled=yes
-        fi
-fi
-
-# eloop-dbus
-eloop_dbus_enabled=no
-if test "x$eloop_dbus_avail" = "xyes" ; then
-        if test "x${enable_eloop_dbus% *}" = "xyes" ; then
-                eloop_dbus_enabled=yes
-        fi
-fi
-
 # optimizations
 optimizations_enabled=no
 if test "x$optimizations_avail" = "xyes" ; then
@@ -835,14 +619,6 @@ AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
                [test "x$optimizations_enabled" = "xyes"])
 
-# eloop-dbus
-AM_CONDITIONAL([BUILD_ENABLE_ELOOP_DBUS],
-               [test "x$eloop_dbus_enabled" = "xyes"])
-
-# eloop
-AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
-               [test "x$eloop_enabled" = "xyes"])
-
 # video fbdev
 if test "x$video_fbdev_enabled" = "xyes" ; then
         AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
@@ -870,10 +646,6 @@ fi
 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
                [test "x$video_drm3d_enabled" = "xyes"])
 
-# uterm
-AM_CONDITIONAL([BUILD_ENABLE_UTERM],
-               [test "x$uterm_enabled" = "xyes"])
-
 # multi-seat
 if test "x$multi_seat_enabled" = "xyes" ; then
         AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
@@ -883,15 +655,6 @@ fi
 AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
                [test "x$multi_seat_enabled" = "xyes"])
 
-# hotplug
-if test "x$hotplug_enabled" = "xyes" ; then
-        AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
-                  [Use udev for hotplug support])
-fi
-
-AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
-               [test "x$hotplug_enabled" = "xyes"])
-
 # renderer bbulk
 if test "x$renderer_bbulk_enabled" = "xyes" ; then
         AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
@@ -955,10 +718,6 @@ fi
 AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
                [test "x$session_terminal_enabled" = "xyes"])
 
-# kmscon
-AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
-               [test "x$kmscon_enabled" = "xyes"])
-
 #
 # Miscellaneous Checks
 # All checks below are independent of module checking or depend on the results
@@ -996,6 +755,7 @@ if test x$have_gbm = xyes ; then
 fi
 
 # check for xsltproc
+AC_ARG_VAR([XSLTPROC], [xsltproc program])
 AC_PATH_PROG(XSLTPROC, xsltproc)
 AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
 
@@ -1014,15 +774,24 @@ else
         AC_MSG_RESULT([no])
 fi
 
+# gles2 helpers
+AM_CONDITIONAL([BUILD_HAVE_GLES2], [test "x$have_gles2" = "xyes"])
+
+# check for mandatory objcopy program
+AC_ARG_VAR([OBJCOPY], [objcopy program])
+AC_CHECK_TOOL([OBJCOPY], [objcopy], "")
+
+if test "x$OBJCOPY" = "x" ; then
+        AC_ERROR([Cannot find "objcopy" program])
+fi
+
 #
 # Makefile vars
 # After everything is configured, we correctly substitute the values for the
 # makefiles.
 #
 
-AC_CONFIG_FILES([Makefile
-                 docs/pc/libeloop.pc
-                 docs/pc/libuterm.pc])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 
 #
@@ -1038,17 +807,10 @@ AC_MSG_NOTICE([Build configuration:
                libdir: $libdir
            includedir: $includedir
 
-  Applications and Libraries:
-               kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
-                uterm: $uterm_enabled ($uterm_avail: $uterm_missing)
-                eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
-
   Miscellaneous Options:
                 debug: $debug_enabled ($debug_avail: $debug_missing)
         optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
            multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
-              hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
-           eloop-dbus: $eloop_dbus_enabled ($eloop_dbus_avail: $eloop_dbus_missing)
 
   Video Backends:
                 fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)