configure.ac revision 53354cdb
153354cdbSmrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 253354cdbSmrgdnl 353354cdbSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 453354cdbSmrgdnl copy of this software and associated documentation files (the 553354cdbSmrgdnl "Software"), to deal in the Software without restriction, including 653354cdbSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 753354cdbSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 853354cdbSmrgdnl to whom the Software is furnished to do so, provided that the above 953354cdbSmrgdnl copyright notice(s) and this permission notice appear in all copies of 1053354cdbSmrgdnl the Software and that both the above copyright notice(s) and this 1153354cdbSmrgdnl permission notice appear in supporting documentation. 1253354cdbSmrgdnl 1353354cdbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1453354cdbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1553354cdbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1653354cdbSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1753354cdbSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1853354cdbSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1953354cdbSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 2053354cdbSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 2153354cdbSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 2253354cdbSmrgdnl 2353354cdbSmrgdnl Except as contained in this notice, the name of a copyright holder 2453354cdbSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 2553354cdbSmrgdnl or other dealings in this Software without prior written authorization 2653354cdbSmrgdnl of the copyright holder. 2753354cdbSmrgdnl 2853354cdbSmrgdnl Process this file with autoconf to create configure. 2953354cdbSmrg 3053354cdbSmrgAC_PREREQ([2.57]) 3153354cdbSmrgAC_INIT(rgb,[1.0.3],[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],rgb) 3253354cdbSmrgAM_INIT_AUTOMAKE([dist-bzip2]) 3353354cdbSmrgAM_MAINTAINER_MODE 3453354cdbSmrg 3553354cdbSmrgAM_CONFIG_HEADER(config.h) 3653354cdbSmrg 3753354cdbSmrgAC_PROG_CC 3853354cdbSmrgAC_PROG_INSTALL 3953354cdbSmrg 4053354cdbSmrgPKG_CHECK_MODULES(RGB, xproto) 4153354cdbSmrg 4253354cdbSmrgAC_MSG_CHECKING([for rgb database location]) 4353354cdbSmrgAC_ARG_WITH([rgb-db-dir], 4453354cdbSmrg AC_HELP_STRING([--with-rgb-db-dir=<path>], 4553354cdbSmrg [rgb database location (default is ${datadir}/X11/rgb)]), 4653354cdbSmrg [db_path=$withval], [db_path=${datadir}/X11/rgb]) 4753354cdbSmrgAC_MSG_RESULT([$db_path]) 4853354cdbSmrgdnl XXX not working - AC_DEFINE([RGB_DB], $db_path, [set to location of rgb database (without any file type suffix)]) 4953354cdbSmrgdb_file=`basename $db_path` 5053354cdbSmrgdb_dir=`dirname $db_path` 5153354cdbSmrgAC_SUBST([db_file]) 5253354cdbSmrgAC_SUBST([db_dir]) 5353354cdbSmrg 5453354cdbSmrgAC_MSG_CHECKING([for rgb database format]) 5553354cdbSmrgAC_ARG_WITH([rgb-db-type], 5653354cdbSmrg AC_HELP_STRING([--with-rgb-db-type=(text|dbm|ndbm)], 5753354cdbSmrg [rgb database type (default is text)]), 5853354cdbSmrg [db_type=$withval], [db_type="text"]) 5953354cdbSmrgAC_MSG_RESULT([$db_type]) 6053354cdbSmrg 6153354cdbSmrgRGB_DB_TYPE=$db_type 6253354cdbSmrg 6353354cdbSmrgcase $db_type in 6453354cdbSmrg text) 6553354cdbSmrg RGB_DB_FILES="" 6653354cdbSmrg AC_DEFINE([USE_RGB_TXT], [1], 6753354cdbSmrg [Define to 1 to use plain text files for rgb database]) 6853354cdbSmrg ;; 6953354cdbSmrg dbm) 7053354cdbSmrg AC_SEARCH_LIBS([dbminit], [db dbm nsl], [], 7153354cdbSmrg AC_MSG_ERROR([dbm requested but dbminit() not found in any libraries])) 7253354cdbSmrg AC_CHECK_HEADER([dbm.h], [DBM_HEADER='<dbm.h>'], 7353354cdbSmrg [AC_CHECK_HEADER([rpcsvc/dbm.h], [DBM_HEADER='<rpcsvc/dbm.h>'], 7453354cdbSmrg [AC_MSG_ERROR([dbm requested but dbm.h not found])])]) 7553354cdbSmrg PKG_CHECK_MODULES(XORG, [xorg-server]) 7653354cdbSmrg RGB_CFLAGS="$RGB_CFLAGS $XORG_CFLAGS" 7753354cdbSmrg RGB_DB_FILES='$(db_file).dir $(db_file).pag' 7853354cdbSmrg ;; 7953354cdbSmrg ndbm) 8053354cdbSmrg # Find a dbm or ndbm implementation 8153354cdbSmrg AC_SEARCH_LIBS([dbm_open], [db ndbm dbm], 8253354cdbSmrg AC_DEFINE([NDBM], [1], 8353354cdbSmrg [Define to 1 if you have ndbm.h interfaces]), 8453354cdbSmrg AC_MSG_ERROR([ndbm requested but dbm_open() not found in any libraries])) 8553354cdbSmrg DBM_HEADER='<ndbm.h>' 8653354cdbSmrg PKG_CHECK_MODULES(XORG, [xorg-server]) 8753354cdbSmrg RGB_CFLAGS="$RGB_CFLAGS $XORG_CFLAGS" 8853354cdbSmrg RGB_DB_FILES='$(db_file).dir $(db_file).pag' 8953354cdbSmrg ;; 9053354cdbSmrgesac 9153354cdbSmrgif test x$DBM_HEADER != x ; then 9253354cdbSmrg AC_DEFINE_UNQUOTED([DBM_HEADER], [$DBM_HEADER], 9353354cdbSmrg [Header file to include for dbm functions]) 9453354cdbSmrgfi 9553354cdbSmrgAC_SUBST([RGB_DB_TYPE]) 9653354cdbSmrgAC_SUBST([RGB_DB_FILES]) 9753354cdbSmrgAM_CONDITIONAL(RGB_DB, [test x$db_type != xtext]) 9853354cdbSmrg 9953354cdbSmrgAC_SUBST(RGB_CFLAGS) 10053354cdbSmrg 10153354cdbSmrgXORG_MANPAGE_SECTIONS 10253354cdbSmrgXORG_RELEASE_VERSION 10353354cdbSmrg 10453354cdbSmrgAC_OUTPUT([Makefile]) 105