michael@1: ## michael@1: ## OSSP asgui - Accounting system graphical user interface michael@3: ## Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) michael@3: ## Copyright (c) 2002-2008 Ralf S. Engelschall michael@3: ## Copyright (c) 2002-2008 Michael Schloh von Bennewitz michael@3: ## Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH michael@1: ## michael@1: ## This file is part of OSSP GUI, a graphical user interface michael@3: ## for OSSP which can be found at http://asgui.europalab.com/ michael@1: ## michael@1: ## Permission to use, copy, modify, and distribute this software for michael@1: ## any purpose with or without fee is hereby granted, provided that michael@1: ## the above copyright notice and this permission notice appear in all michael@1: ## copies. michael@1: ## michael@1: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@1: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@1: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@1: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@1: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@1: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@1: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@1: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@1: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@1: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@1: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@1: ## SUCH DAMAGE. michael@1: ## michael@1: ## aclocal.m4: Autoconf M4 macros michael@1: ## michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Look for SIOCGIFHWADDR michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_CHECK_SIOCGIFHWADDR,[ michael@1: AC_MSG_CHECKING(whether has SIOCGIFHWADDR) michael@1: AC_TRY_COMPILE([#include michael@1: #include michael@1: ], [ michael@1: int i = SIOCGIFHWADDR; michael@1: return 0;], michael@1: AC_DEFINE(HAVE_SIOCGIFHWADDR, 1, [Define to 1 if defines or includes SIOCGIFHWADDR.]), michael@1: AC_MSG_RESULT([no]), michael@1: AC_MSG_RESULT([yes])) michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Look for SIOCGIFCONF michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_CHECK_SIOCGIFCONF,[ michael@1: AC_MSG_CHECKING(whether has SIOCGIFCONF) michael@1: AC_TRY_COMPILE([#include michael@1: #include michael@1: ], [ michael@1: int i = SIOCGIFCONF; michael@1: return 0;], michael@1: AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Define to 1 if defines or includes SIOCGIFCONF.]), michael@1: AC_MSG_RESULT([no]), michael@1: AC_MSG_RESULT([yes])) michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Look for SIOGHWADDR michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_CHECK_SIOGHWADDR,[ michael@1: AC_MSG_CHECKING(whether has SIOGHWADDR) michael@1: AC_TRY_COMPILE([#include michael@1: #include michael@1: ], [ michael@1: int i = SIOGHWADDR; michael@1: return 0;], michael@1: AC_DEFINE(HAVE_SIOGHWADDR, 1, [Define to 1 if defines or includes SIOGHWADDR.]), michael@1: AC_MSG_RESULT([no]), michael@1: AC_MSG_RESULT([yes])) michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Look for SIOCGENADDR michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_CHECK_SIOCGENADDR,[ michael@1: AC_MSG_CHECKING(whether has SIOCGENADDR) michael@1: AC_TRY_COMPILE([#include michael@1: #include michael@1: ], [ michael@1: int i = SIOCGENADDR; michael@1: return 0;], michael@1: AC_DEFINE(HAVE_SIOCGENADDR, 1, [Define to 1 if defines or includes SIOCGENADDR.]), michael@1: AC_MSG_RESULT([no]), michael@1: AC_MSG_RESULT([yes])) michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Check for sa_len member of the sockaddr michael@1: dnl ## structure found in BSD systems michael@1: dnl ## michael@1: dnl ## configure.in: michael@1: dnl ## AC_STRUCT_SA_LEN michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_STRUCT_SA_LEN, michael@1: [AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_struct_sa_len, michael@1: [AC_TRY_COMPILE([ michael@1: #include michael@1: #include michael@1: ], michael@1: [ michael@1: struct sockaddr s; michael@1: s.sa_len; michael@1: ], michael@1: ac_cv_struct_sa_len=yes, ac_cv_struct_sa_len=no)]) michael@1: if test $ac_cv_struct_sa_len = yes; then michael@1: AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if your sockaddr has a sa_len member.]) michael@1: fi michael@1: ]) michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Support for Platform IDs michael@1: dnl ## michael@1: dnl ## configure.in: michael@1: dnl ## AC_PLATFORM() michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_PLATFORM,[ michael@1: if test ".$host" != .NONE && test ".$host" != .; then michael@1: $1="$host" michael@1: else michael@1: $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` michael@1: fi michael@1: $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $$1` || exit 1 michael@1: AC_SUBST($1) michael@1: if test ".$enable_subdir" != .yes; then michael@1: echo "Platform: ${TB}${$1}${TN}" michael@1: fi michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Support for Configuration Headers michael@1: dnl ## michael@1: dnl ## configure.in: michael@1: dnl ## AC_HEADLINE(, , michael@1: dnl ## , , michael@1: dnl ## ) michael@1: dnl ## michael@1: michael@1: AC_DEFUN(AC_HEADLINE,[dnl michael@1: # configuration header michael@1: if test ".`echo dummy [$]@ | grep help`" = .; then michael@1: # bootstrapping shtool michael@1: ac_prog=[$]0 michael@1: changequote(, )dnl michael@1: ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` michael@1: changequote([, ])dnl michael@1: test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=. michael@1: ac_shtool="$ac_srcdir/shtool" michael@1: michael@1: # find out terminal sequences michael@1: TB=`$ac_shtool echo -n -e %B 2>/dev/null` michael@1: TN=`$ac_shtool echo -n -e %b 2>/dev/null` michael@1: michael@1: # find out package version michael@1: $3_STR="`$ac_shtool version -l c -d long $ac_srcdir/$4`" michael@1: AC_SUBST($3_STR) michael@1: michael@1: # friendly header ;) michael@1: if test ".$enable_headline" != .no; then michael@1: echo "Configuring ${TB}$1${TN} ($2), Version ${TB}${$3_STR}${TN}" michael@1: echo "$5" michael@1: fi michael@1: michael@1: # additionally find out hex version michael@1: $3_HEX="`$ac_shtool version -l c -d hex $ac_srcdir/$4`" michael@1: AC_SUBST($3_HEX) michael@1: fi michael@1: ])dnl michael@1: michael@1: michael@1: dnl ## michael@1: dnl ## Check whether compiler option works michael@1: dnl ## michael@1: dnl ## configure.in: michael@1: dnl ## AC_COMPILER_OPTION(, ,