"Fossies" - the Fresh Open Source Software Archive

Member "ident2-v1.07_FINAL/configure.in" (10 Apr 2005, 2662 Bytes) of package /linux/privat/old/ident2-v1.07_FINAL.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 dnl Fix me I'm badly written!
    2 dnl Process this file with autoconf to produce a configure script.
    3 AC_INIT(common.c)
    4 AC_CONFIG_AUX_DIR(util)
    5 
    6 echo > config.h
    7 
    8 echo -n "checking host operating system... "
    9 HOSTOS=`uname -s 2> /dev/null`
   10 echo "$HOSTOS"
   11 HOSTREL=`uname -r 2> /dev/null`
   12 echo -n "checking system version... "
   13 echo "$HOSTREL"
   14 
   15 dnl Use if it is an error not to find a program.
   16 AC_DEFUN(ENSURE_PATH_PROG, [
   17     AC_PATH_PROG($1, $2)
   18     if test -z "${$1}" ; then
   19         AC_MSG_ERROR($2 was not found in path and is required)
   20     fi
   21 ])
   22 
   23 case "$HOSTOS" in
   24 	Linux*)
   25 		cp sys/m_linux.c machine.c
   26 	;;
   27 	FreeBSD*)	# remember, test returns a non-zero value if true
   28 		if (test "$HOSTREL" = "3.*")
   29 		then
   30 			echo "====================================="
   31 			echo "System version is not 3.x, this server may not"
   32 			echo "compile or run on this version. Good luck."
   33 			echo "====================================="	
   34 		fi
   35 		cp sys/m_fbsd.c machine.c
   36 	;;
   37 	SunOS|NetBSD|OpenBSD|OSF/1|HP-UX*)
   38 		if (test "$HOSTREL" = "5.10" -a "$HOSTOS" = "SunOS" ); then
   39 			echo "======================================"
   40 			echo "Remember, for Solaris 10, you should"
   41 			echo "compile the latest version of lsof"
   42 			echo "from source."
   43 			echo "======================================"
   44 		fi
   45 		cp sys/m_lsof.c machine.c
   46 		ENSURE_PATH_PROG(LSOF, lsof)
   47 		CFLAGS="$CFLAGS -DLSOF_LOCATION='\"$LSOF\"'"
   48 		AC_SUBST(CFLAGS)
   49 	;;
   50 	*)
   51 		echo "======================================"
   52 		echo "Your Operating System is not supported"
   53 		echo "..see README to find out how to port"
   54 		echo "..ident2 to this platform"
   55 		echo "======================================"
   56 		exit 1
   57 esac
   58 		
   59 dnl Checks for programs.
   60 AC_PROG_INSTALL
   61 AC_PROG_CC
   62 
   63 dnl Checks for libraries.
   64 
   65 dnl Checks for header files.
   66 AC_HEADER_STDC
   67 AC_HEADER_SYS_WAIT
   68 AC_CHECK_HEADERS(fcntl.h sys/time.h syslog.h unistd.h)
   69 
   70 dnl Checks for typedefs, structures, and compiler characteristics.
   71 AC_TYPE_PID_T
   72 AC_TYPE_SIZE_T
   73 AC_TYPE_UID_T
   74 
   75 dnl Checks for library functions.
   76 AC_TYPE_SIGNAL
   77 AC_CHECK_FUNCS(select socket strerror strstr)
   78 AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
   79 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
   80 
   81 dnl Checks for /var/run
   82 echo -n 'checking for /var/run/... '
   83 if test -d /var/run
   84 then
   85 	echo '#define HAS_VAR_RUN' >> config.h
   86 	echo 'yes'
   87 else
   88 	echo 'no -- automatic shutdown not supported'
   89 fi
   90 
   91 echo -n 'checking for getopt_long... '
   92 AC_TRY_COMPILE(
   93 	[#include <stdio.h>
   94 	#include <stdlib.h>
   95 	#include <unistd.h>
   96 	#include <getopt.h>],
   97 	[getopt_long(0,NULL,NULL,NULL,NULL);],
   98 	[echo yes; echo \#define HAS_GETOPT_LONG >> config.h],
   99 	[echo no - short command line options only])
  100 	
  101 AC_OUTPUT(Makefile)