Merge branch 'branch-0.0.1'
This commit is contained in:
		
						commit
						298775a047
					
				| 
						 | 
					@ -0,0 +1,97 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					# libiso8601/src/libiso8601/config-script
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# libiso8601-config template. Variables are finalised at install time.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					dep_cflags="@DEP_CFLAGS@"
 | 
				
			||||||
 | 
					dep_libs="@DEP_LIBS@"
 | 
				
			||||||
 | 
					include_dir="@INCLUDE_DIR@"
 | 
				
			||||||
 | 
					include_dir_set="no"
 | 
				
			||||||
 | 
					lib_dir="@LIB_DIR@"
 | 
				
			||||||
 | 
					lib_dir_set="no"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					usage() {
 | 
				
			||||||
 | 
					    cat <<EOF
 | 
				
			||||||
 | 
					Usage: libiso8601-config [options]
 | 
				
			||||||
 | 
					Options:
 | 
				
			||||||
 | 
					        [--version]
 | 
				
			||||||
 | 
					        [--libs]
 | 
				
			||||||
 | 
					        [--libdir[=DIR]]
 | 
				
			||||||
 | 
					        [--cflags]
 | 
				
			||||||
 | 
					        [--includedir[=DIR]]
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					    exit $1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ $# -eq 0 ] && usage 1 1>&2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					while [ $# -gt 0 ]
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    case "$1" in
 | 
				
			||||||
 | 
					        -*=*) 
 | 
				
			||||||
 | 
					            optarg="$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//')"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        *)
 | 
				
			||||||
 | 
					            optarg=""
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case "$1" in
 | 
				
			||||||
 | 
					        --libdir=*)
 | 
				
			||||||
 | 
					            lib_dir="${optarg}"
 | 
				
			||||||
 | 
					            lib_dir_set="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --libdir)
 | 
				
			||||||
 | 
					            echo_lib_dir="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --includedir=*)
 | 
				
			||||||
 | 
					            include_dir="${optarg}"
 | 
				
			||||||
 | 
					            include_dir_set="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --includedir)
 | 
				
			||||||
 | 
					            echo_include_dir="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --version)
 | 
				
			||||||
 | 
					            echo "@VERSION@"
 | 
				
			||||||
 | 
					            exit 0
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --cflags)
 | 
				
			||||||
 | 
					            [ "${include_dir}" != "/usr/include" ] && includes="-I${include_dir}"
 | 
				
			||||||
 | 
					            echo_cflags="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        --libs)
 | 
				
			||||||
 | 
					            echo_libs="yes"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        *)
 | 
				
			||||||
 | 
					            usage 1 1>&2
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    shift
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ "${echo_prefix}" == "yes" ] && echo "${prefix}"
 | 
				
			||||||
 | 
					[ "${echo_exec_prefix}" == "yes" ] && echo "${exec_prefix}"
 | 
				
			||||||
 | 
					[ "${echo_cflags}" == "yes" ] && echo "${dep_cflags} ${includes}"
 | 
				
			||||||
 | 
					[ "${echo_libs}" == "yes" ] && echo "${dep_libs} -L${lib_dir} -liso8601"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# vim: expandtab:ts=4:sw=4
 | 
				
			||||||
 | 
					# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
 | 
				
			||||||
		Loading…
	
		Reference in New Issue