]> git.cworth.org Git - glaze/blobdiff - configure
Add a new libglaze library
[glaze] / configure
index 6195562fb3f63120bca09c5c4db5ecbf441b2baf..d115790d56296b6d99f9d732b525f226cf6c04fa 100755 (executable)
--- a/configure
+++ b/configure
@@ -3,6 +3,11 @@
 PROJECT=glaze
 PROJECT_BLURB="a shiny way to wrap OpenGL"
 
+MAJOR=0
+MINOR=0
+RELEASE=0
+VERSION=${MAJOR}.${MINOR}.${RELEASE}
+
 srcdir=$(dirname "$0")
 
 # For a non-srcdir configure invocation (such as ../configure), create
@@ -240,22 +245,43 @@ CFLAGS = ${CFLAGS}
 LDFLAGS = ${LDFLAGS}
 
 # Flags to enable warnings when using the C compiler
-WARN_CFLAGS=${WARN_CFLAGS}
+WARN_CFLAGS = ${WARN_CFLAGS}
 
 # The prefix to which ${PROJECT} should be installed
 PREFIX = ${PREFIX}
 
 # The directory to which executables should be installed
-BINDIR = ${BINDIR:=\$(PREFIX)/bin}
+BINDIR = ${BINDIR:-\$(PREFIX)/bin}
 
 # The directory to which libraries should be installed
-LIBDIR = ${LIBDIR:=\$(PREFIX)/lib}
+LIBDIR = ${LIBDIR:-\$(PREFIX)/lib}
 
 # The directory to which headers should be installed
-INCLUDEDIR = ${INCLUDEDIR:=\$(PREFIX)/include}
+INCLUDEDIR = ${INCLUDEDIR:-\$(PREFIX)/include}
 
 # Whether compiler can create 32 or 64-bit binaries
 COMPILER_SUPPORTS_32 = ${have_m32}
 COMPILER_SUPPORTS_64 = ${have_m64}
 
+# Version information for glaze library
+MAJOR   = ${MAJOR}
+MINOR   = ${MINOR}
+RELEASE = ${RELEASE}
+VERSION = ${VERSION}
+
+EOF
+
+# construct the glaze.pc file
+cat > glaze.pc <<EOF
+prefix=${PREFIX}
+exec_prefix=\${prefix}
+libdir=${LIBDIR:-\${exec_prefix\}/lib}
+includedir=${INCLUDEDIR:-\${prefix\}/include}
+
+Name: ${PROJECT}
+Description: ${PROJECT_BLURB}
+Version: ${VERSION}
+
+Libs: -L\${libdir} -lglaze
+Cflags: -I\${includedir}/glaze
 EOF