Skip to content
Snippets Groups Projects
configure 412 KiB
Newer Older
  • Learn to ignore specific revisions
  • else
      	ol_with_passwd_module="static"
    fi
    # end --with-passwd_module
    
    
    # OpenLDAP --enable-perl
    	# Check whether --enable-perl or --disable-perl was given.
    if test "${enable_perl+set}" = set; then
      enableval="$enable_perl"
      
    	ol_arg=invalid
    	for ol_val in auto yes no ; do
    		if test "$enableval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    		{ echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
    	fi
    	ol_enable_perl="$ol_arg"
    
    else
      	ol_enable_perl="no"
    fi
    # end --enable-perl
    
    # OpenLDAP --with-perl_module
    	# Check whether --with-perl_module or --without-perl_module was given.
    if test "${with_perl_module+set}" = set; then
      withval="$with_perl_module"
      
    	ol_arg=invalid
    	for ol_val in static dynamic ; do
    		if test "$withval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    		{ echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
    	fi
    	ol_with_perl_module="$ol_arg"
    
    else
      	ol_with_perl_module="static"
    fi
    # end --with-perl_module
    
    
    # OpenLDAP --enable-shell
    	# Check whether --enable-shell or --disable-shell was given.
    if test "${enable_shell+set}" = set; then
      enableval="$enable_shell"
      
    	ol_arg=invalid
    	for ol_val in auto yes no ; do
    		if test "$enableval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    		{ echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
    	fi
    	ol_enable_shell="$ol_arg"
    
    else
      	ol_enable_shell="no"
    fi
    # end --enable-shell
    
    # OpenLDAP --with-shell_module
    	# Check whether --with-shell_module or --without-shell_module was given.
    if test "${with_shell_module+set}" = set; then
      withval="$with_shell_module"
      
    	ol_arg=invalid
    	for ol_val in static dynamic ; do
    		if test "$withval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    		{ echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
    	fi
    	ol_with_shell_module="$ol_arg"
    
    else
      	ol_with_shell_module="static"
    fi
    # end --with-shell_module
    
    
    # OpenLDAP --enable-sql
    	# Check whether --enable-sql or --disable-sql was given.
    if test "${enable_sql+set}" = set; then
      enableval="$enable_sql"
    
      
    	ol_arg=invalid
    	for ol_val in auto yes no ; do
    		if test "$enableval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    
    		{ echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
    
    	ol_enable_sql="$ol_arg"
    
    # end --enable-sql
    # OpenLDAP --with-sql_module
    	# Check whether --with-sql_module or --without-sql_module was given.
    if test "${with_sql_module+set}" = set; then
      withval="$with_sql_module"
    
      
    	ol_arg=invalid
    	for ol_val in static dynamic ; do
    		if test "$withval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    
    		{ echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
    
    	ol_with_sql_module="$ol_arg"
    
      	ol_with_sql_module="static"
    
    # end --with-sql_module
    
    # OpenLDAP --enable-tcl
    	# Check whether --enable-tcl or --disable-tcl was given.
    if test "${enable_tcl+set}" = set; then
      enableval="$enable_tcl"
    
      
    	ol_arg=invalid
    	for ol_val in auto yes no ; do
    		if test "$enableval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    
    		{ echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
    
    	ol_enable_tcl="$ol_arg"
    
    # end --enable-tcl
    # OpenLDAP --with-tcl_module
    	# Check whether --with-tcl_module or --without-tcl_module was given.
    if test "${with_tcl_module+set}" = set; then
      withval="$with_tcl_module"
    
      
    	ol_arg=invalid
    	for ol_val in static dynamic ; do
    		if test "$withval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    
    		{ echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
    
    	ol_with_tcl_module="$ol_arg"
    
      	ol_with_tcl_module="static"
    
    # end --with-tcl_module
    
    # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
    if test "${with_xxslurpdoptions+set}" = set; then
      withval="$with_xxslurpdoptions"
      :
    fi
    
    
    # OpenLDAP --enable-slurpd
    	# Check whether --enable-slurpd or --disable-slurpd was given.
    if test "${enable_slurpd+set}" = set; then
      enableval="$enable_slurpd"
      
    	ol_arg=invalid
    	for ol_val in auto yes no ; do
    		if test "$enableval" = "$ol_val" ; then
    			ol_arg="$ol_val"
    		fi
    	done
    	if test "$ol_arg" = "invalid" ; then
    		{ echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
    	fi
    	ol_enable_slurpd="$ol_arg"
    
    else
      	ol_enable_slurpd="auto"
    fi
    # end --enable-slurpd
    
    
    # Check whether --with-xxliboptions or --without-xxliboptions was given.
    if test "${with_xxliboptions+set}" = set; then
      withval="$with_xxliboptions"
      :
    fi
    
    # Check whether --enable-static or --disable-static was given.
    if test "${enable_static+set}" = set; then
      enableval="$enable_static"
      p=${PACKAGE-default}
    case "$enableval" in
    yes) enable_static=yes ;;
    no) enable_static=no ;;
    *)
      enable_static=no
      # Look at the argument we got.  We use all the common list separators.
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
      for pkg in $enableval; do
        if test "X$pkg" = "X$p"; then
          enable_static=yes
        fi
      done
      IFS="$ac_save_ifs"
      ;;
    esac
    else
      enable_static=yes
    fi
    
    # Check whether --enable-shared or --disable-shared was given.
    if test "${enable_shared+set}" = set; then
      enableval="$enable_shared"
      p=${PACKAGE-default}
    case "$enableval" in
    yes) enable_shared=yes ;;
    no) enable_shared=no ;;
    *)
      enable_shared=no
      # Look at the argument we got.  We use all the common list separators.
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
      for pkg in $enableval; do
        if test "X$pkg" = "X$p"; then
          enable_shared=yes
        fi
      done
      IFS="$ac_save_ifs"
      ;;
    esac
    else
      enable_shared=yes
    fi
    
    
    
    if test $ol_enable_slapd = no ; then
    
    		if test $ol_enable_dnssrv = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
    	fi
    
    	if test $ol_enable_ldap = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
    
    	if test $ol_enable_ldbm = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
    
    	fi
    	if test $ol_enable_passwd = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
    
    	if test $ol_enable_perl = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
    
    	if test $ol_enable_shell = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
    
    	if test $ol_enable_tcl = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
    
    	if test $ol_enable_sql = yes ; then
    		echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
    	fi
    
    	if test $ol_enable_modules = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
    
    	if test $ol_enable_multimaster = yes ; then
    		echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
    	fi
    
    	if test $ol_enable_wrappers = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
    
    	fi
    	if test $ol_enable_phonetic = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
    
    	if test $ol_enable_quipu = yes ; then
    		echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
    	fi
    
    	if test $ol_enable_rlookups = yes ; then
    
    		echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
    
    	if test $ol_enable_aci = yes ; then
    		echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
    	fi
    
    	if test $ol_with_ldbm_api != auto ; then
    
    		echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
    
    	fi
    	if test $ol_with_ldbm_type != auto ; then
    
    		echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
    
    	if test $ol_with_dnssrv_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
    	fi
    
    	if test $ol_with_ldap_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
    	fi
    	if test $ol_with_ldbm_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
    	fi
    	if test $ol_with_passwd_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
    	fi
    	if test $ol_with_perl_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
    	fi
    	if test $ol_with_shell_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
    	fi
    	if test $ol_with_tcl_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
    	fi
    
    	if test $ol_with_sql_module != static ; then
    		echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
    	fi
    
    	if test $ol_enable_slurpd = yes ; then
    
    		{ echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
    
    	fi
    
    	# force settings to no
    
    	ol_enable_ldbm=no
    	ol_enable_passwd=no
    
    	ol_enable_perl=no
    	ol_enable_shell=no
    
    	ol_enable_phonetic=no
    
    	ol_enable_quipu=no
    
    	ol_enable_rlookups=no
    
    	ol_enable_wrappers=no
    
    	ol_with_ldbm_api=no
    	ol_with_ldbm_type=no
    
    	ol_with_dnssrv_module=static
    
    	ol_with_ldap_module=static
    	ol_with_ldbm_module=static
    	ol_with_passwd_module=static
    	ol_with_perl_module=static
    	ol_with_shell_module=static
    	ol_with_tcl_module=static
    
    	ol_enable_slurpd=no
    
    elif test $ol_enable_ldbm = no ; then
    	
    	if test $ol_with_ldbm_api != auto ; then
    
    		echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
    
    	fi
    
    	if test $ol_with_ldbm_type != auto ; then
    
    		echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
    
    	if test $ol_with_ldbm_module != static ; then
    		echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
    	fi
    
    
    	if test $ol_enable_modules != yes -a \
    
    		$ol_enable_dnssrv = no -a \
    
    		$ol_enable_passwd = no -a \
    
    		$ol_enable_sql = no -a \
    		$ol_enable_tcl = no ; then
    
    		{ echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
    
    	fi
    
    	ol_with_ldbm_api=no
    	ol_with_ldbm_type=no
    
    		if test $ol_with_ldbm_api = gdbm -a \
    
    		$ol_with_ldbm_type = btree ; then
    
    		{ echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
    
    	if test $ol_with_ldbm_api = mdbm -a \
    		$ol_with_ldbm_type = btree ; then
    		{ echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
    	fi
    
    	if test $ol_with_ldbm_api = ndbm -a \
    		$ol_with_ldbm_type = btree ; then
    
    		{ echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
    
    	fi
    fi
    
    if test $ol_enable_slurpd = yes ; then
    		if test $ol_with_threads = no ; then
    
    		{ echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
    
    if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
    	if test $ol_with_kerberos = no ; then
    		{ echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
    	fi
    
    elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
    	if test $ol_with_kerberos != auto ; then
    		echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
    	else
    		ol_with_kerberos=no
    	fi
    
    if test $ol_enable_spasswd = yes ; then
    	if test $ol_with_cyrus_sasl = no ; then
    		{ echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
    	fi
    
    	ol_link_spasswd=yes
    
    echo "$ac_t""done" 1>&6
    
    LDAP_LIBS=
    
    LDBM_LIBS=
    LTHREAD_LIBS=
    LUTIL_LIBS=
    
    
    SLAPD_LIBS=
    SLURPD_LIBS=
    
    BUILD_SLAPD=no
    BUILD_SLURPD=no
    
    
    BUILD_QUIPU=no
    BUILD_THREAD=no
    
    BUILD_DNSSRV=no
    
    BUILD_LDBM=no
    BUILD_PASSWD=no
    
    BUILD_SHELL=no
    
    BUILD_DNSSRV_DYNAMIC=static
    
    BUILD_LDAP_DYNAMIC=static
    BUILD_LDBM_DYNAMIC=static
    BUILD_PASSWD_DYNAMIC=static
    BUILD_PERL_DYNAMIC=static
    BUILD_SHELL_DYNAMIC=static
    BUILD_TCL_DYNAMIC=static
    
    SLAPD_MODULES_LDFLAGS=
    SLAPD_MODULES_CPPFLAGS=
    
    SLAPD_PERL_LDFLAGS=
    
    MOD_PERL_LDFLAGS=
    PERL_CPPFLAGS=
    
    SLAPD_SQL_LDFLAGS=
    SLAPD_SQL_LIBS=
    SLAPD_SQL_INCLUDES=
    
    
    SASL_LIBS=
    
    TERMCAP_LIBS=
    
    AUTH_LIBS=
    
    cat >> confdefs.h <<\EOF
    #define HAVE_MKVERSION 1
    EOF
    
    
    
    
    
    case "$target" in
    
    *-*-aix*) 	if test -z "$CC" ; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    		case "$ol_with_threads" in
    
    		auto | yes |  posix) ol_aix_threads=yes ;;
    
    if test $ol_aix_threads = yes ; then
    	if test -z "${CC}" ; then
    		for ac_prog in cc_r xlc_r cc
    
    do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
    set dummy $ac_prog; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2520: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$CC"; then
      ac_cv_prog_CC="$CC" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_CC="$ac_prog"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    CC="$ac_cv_prog_CC"
    if test -n "$CC"; then
      echo "$ac_t""$CC" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    test -n "$CC" && break
    done
    
    
    
    		if test "$CC" = cc ; then
    						if test $ol_with_threads != auto ; then
    				{ echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
    			else
    				echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
    			fi
    			ol_with_threads=no
      		fi
    	fi
    
    	if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
    
    		ol_with_threads=posix
    		ol_cv_pthread_create=yes
    	fi
    fi
    
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if test -z "${CC}"; then
    	for ac_prog in cc
    do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
    set dummy $ac_prog; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2572: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$CC"; then
      ac_cv_prog_CC="$CC" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_CC="$ac_prog"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    CC="$ac_cv_prog_CC"
    if test -n "$CC"; then
      echo "$ac_t""$CC" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    test -n "$CC" && break
    done
    
    fi
    
    
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    # Check whether --enable-fast-install or --disable-fast-install was given.
    if test "${enable_fast_install+set}" = set; then
      enableval="$enable_fast_install"
      p=${PACKAGE-default}
    case "$enableval" in
    yes) enable_fast_install=yes ;;
    no) enable_fast_install=no ;;
    *)
      enable_fast_install=no
      # Look at the argument we got.  We use all the common list separators.
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
      for pkg in $enableval; do
        if test "X$pkg" = "X$p"; then
          enable_fast_install=yes
        fi
      done
      IFS="$ac_save_ifs"
      ;;
    esac
    else
      enable_fast_install=yes
    fi
    
    
    # Extract the first word of "ranlib", so it can be a program name with args.
    set dummy ranlib; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2632: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$RANLIB"; then
      ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
    else
    
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
    
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_RANLIB="ranlib"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
    fi
    fi
    RANLIB="$ac_cv_prog_RANLIB"
    if test -n "$RANLIB"; then
      echo "$ac_t""$RANLIB" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    # Extract the first word of "gcc", so it can be a program name with args.
    set dummy gcc; ac_word=$2
    
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2662: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      if test -n "$CC"; then
      ac_cv_prog_CC="$CC" # Let the user override the test.
    else
    
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
    
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
    
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    
    fi
    CC="$ac_cv_prog_CC"
    if test -n "$CC"; then
      echo "$ac_t""$CC" 1>&6
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$CC"; then
      # Extract the first word of "cc", so it can be a program name with args.
    set dummy cc; ac_word=$2
    
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2692: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
      if test -n "$CC"; then
      ac_cv_prog_CC="$CC" # Let the user override the test.
    else
    
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
    
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
    
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
            ac_prog_rejected=yes
    	continue
          fi
          ac_cv_prog_CC="cc"
          break
        fi
      done
      IFS="$ac_save_ifs"
    if test $ac_prog_rejected = yes; then
      # We found a bogon in the path, so make sure we never use it.
      set dummy $ac_cv_prog_CC
      shift
      if test $# -gt 0; then
        # We chose a different compiler from the bogus one.
        # However, it has the same basename, so the bogon will be chosen
        # first if we set CC to just the basename; use the full file name.
        shift
        set dummy "$ac_dir/$ac_word" "$@"
        shift
        ac_cv_prog_CC="$@"
      fi
    fi
    fi
    fi
    CC="$ac_cv_prog_CC"
    if test -n "$CC"; then
      echo "$ac_t""$CC" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
      if test -z "$CC"; then
        case "`uname -s`" in
    
        *win32* | *WIN32* | *CYGWIN*)
    
          # Extract the first word of "cl", so it can be a program name with args.
    set dummy cl; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:2743: checking for $ac_word" >&5
    
    if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$CC"; then
      ac_cv_prog_CC="$CC" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_CC="cl"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    CC="$ac_cv_prog_CC"
    if test -n "$CC"; then
      echo "$ac_t""$CC" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
     ;;
        esac
      fi
    
      test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
    fi
    
    
    echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    
    echo "configure:2775: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
    
    
    ac_ext=c
    # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    
    ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    
    cross_compiling=$ac_cv_prog_cc_cross
    
    
    #include "confdefs.h"
    
    main(){return(0);}
    EOF
    
    if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      ac_cv_prog_cc_works=yes
      # If we can't run a trivial program, we are probably using a cross compiler.
      if (./conftest; exit) 2>/dev/null; then
        ac_cv_prog_cc_cross=no
      else
        ac_cv_prog_cc_cross=yes
      fi
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      ac_cv_prog_cc_works=no
    fi
    rm -fr conftest*
    
    ac_ext=c
    # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    cross_compiling=$ac_cv_prog_cc_cross
    
    
    echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
    if test $ac_cv_prog_cc_works = no; then
      { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
    fi
    
    echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    
    echo "configure:2817: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
    
    echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    cross_compiling=$ac_cv_prog_cc_cross
    
    echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    
    echo "configure:2822: checking whether we are using GNU C" >&5
    
    if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.c <<EOF
    #ifdef __GNUC__
      yes;
    #endif
    EOF
    
    if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    
      ac_cv_prog_gcc=yes
    else
      ac_cv_prog_gcc=no
    fi
    fi
    
    echo "$ac_t""$ac_cv_prog_gcc" 1>&6
    
    if test $ac_cv_prog_gcc = yes; then
      GCC=yes
    
    else
      GCC=
    fi
    
    ac_test_CFLAGS="${CFLAGS+set}"
    ac_save_CFLAGS="$CFLAGS"
    CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    
    echo "configure:2850: checking whether ${CC-cc} accepts -g" >&5
    
    if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      echo 'void f(){}' > conftest.c
    if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
      ac_cv_prog_cc_g=yes
    else
      ac_cv_prog_cc_g=no
    fi
    rm -f conftest*
    
    fi
    
    echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
    
    if test "$ac_test_CFLAGS" = set; then
      CFLAGS="$ac_save_CFLAGS"
    elif test $ac_cv_prog_cc_g = yes; then
      if test "$GCC" = yes; then
    
        CFLAGS="-g -O2"
      else
    
      if test "$GCC" = yes; then
        CFLAGS="-O2"
      else
        CFLAGS=
      fi
    
    # Check whether --with-gnu-ld or --without-gnu-ld was given.
    if test "${with_gnu_ld+set}" = set; then
      withval="$with_gnu_ld"
      test "$withval" = no || with_gnu_ld=yes
    else
      with_gnu_ld=no
    fi
    
    ac_prog=ld
    if test "$ac_cv_prog_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
    
    echo "configure:2893: checking for ld used by GCC" >&5
    
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        # Accept absolute paths.
        [\\/]* | [A-Za-z]:[\\/]*)
          re_direlt='/[^/][^/]*/\.\./'
          # Canonicalize the path of ld
          ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
          while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
    	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
          done
          test -z "$LD" && LD="$ac_prog"
          ;;
    
      "")
        # If it fails, then pretend we aren't using GCC.
        ac_prog=ld
        ;;
      *)
        # If it is relative, then search for the first ld in PATH.
        with_gnu_ld=unknown
        ;;
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
    
    echo "configure:2917: checking for GNU ld" >&5
    
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
    
    echo "configure:2920: checking for non-GNU ld" >&5
    
    if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -z "$LD"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
    
      for ac_dir in $PATH; do
        test -z "$ac_dir" && ac_dir=.
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
    
          ac_cv_path_LD="$ac_dir/$ac_prog"
          # Check to see if the program is GNU ld.  I'd rather use --version,
          # but apparently some GNU ld's only accept -v.
          # Break only if it was the GNU/non-GNU ld that we prefer.
          if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
    	test "$with_gnu_ld" != no && break
          else
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	test "$with_gnu_ld" != yes && break
    
          fi
        fi
      done
      IFS="$ac_save_ifs"
    else
      ac_cv_path_LD="$LD" # Let the user override the test with a path.
    fi
    fi
    
    LD="$ac_cv_path_LD"
    if test -n "$LD"; then
      echo "$ac_t""$LD" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
    echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
    
    echo "configure:2955: checking if the linker ($LD) is GNU ld" >&5
    
    if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      # I'd rather use --version here, but apparently some GNU ld's only accept -v.
    if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
      ac_cv_prog_gnu_ld=yes
    else
      ac_cv_prog_gnu_ld=no
    fi
    fi
    
    echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
    
    
    echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
    
    echo "configure:2971: checking for BSD-compatible nm" >&5
    
    if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      if test -n "$NM"; then
      # Let the user override the test.
      ac_cv_path_NM="$NM"
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
      for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
    
          # Check to see if the nm accepts a BSD-compat flag.
          # Adding the `sed 1q' prevents false positives on HP-UX, which says:
          #   nm: unknown option "B" ignored
          if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	ac_cv_path_NM="$ac_dir/nm -B"
    	break
    
          elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	ac_cv_path_NM="$ac_dir/nm -p"
    	break
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
    	continue # so that we can try to find one that supports BSD flags
    
          fi
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm