#!/usr/bin/env bash
#
# This is not generated by autoconf or similar, just handcoded, since we don't
# need this much complexity

# Our configuration for the makefiles !!
LIBNAME=libiwpower
DISTNAME=iwpower
DISTDIR=iwpower
VERSION=0.1.0

# include the check function library
. ./conf/functions

EXTRACLEANFILES="test doxygen.log libiw*"
STERILFILES="*.tag lib/*.a lib/*.so* include/config.h makefile.conf"
STERILDIRS=doc
LIBLIBS="-liwsens"

# Files to be linked together to the library

LIBFILES_src="
powerevent.o
power_base.o
power_acpi.o
power_apm.o
power_omnibook.o
powermanager.o
optionguard.o
"

# do the prechecks, among others it tells us the os type class
. ./conf/common_precheck

#
# End of configurable stuff
#

. ./conf/config_cache


# simple command line parameter parsing
prev=
option=--`echo $prev | sed 's/_/-/g'`
optarg=`expr "x$option" : 'x[^=]*=\(.*\)'`

for option
do
. ./conf/common_optionparse
# These are the module specific options
	case $option in 
	--debuglevel=*)
	    DEBUGLEVEL="$optarg" 
	    continue;;
	esac
# This file contains the loop end as well as the common variable setting and the default case
. ./conf/common_optiondefaults
done

set_dirs

. ./conf/common_help
add_help ...
maybe_display_help

write_config_cache $@
check_ostype
check_dynlib
check_gcc 4.1.2
check_cxx 4.1.2
check_gmake 3.81
check_iwsens 0.5.0
check_echo
check_doxygen
check_pkg_config

gen_makefile makefile.conf

gen_config $CONFIG_H

output_config PREFIX SYSCONF LIBDIR