X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=configure;h=d25e22a4b3820951164753053d173fb93e92860e;hb=553d330d06573b6bc951e3c00672a1abfe29b7aa;hp=6195562fb3f63120bca09c5c4db5ecbf441b2baf;hpb=0b190cc8fbca0f970eadd8c0f1d5792c41f71cf6;p=glaze diff --git a/configure b/configure index 6195562..d25e22a 100755 --- 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 @@ -171,6 +176,12 @@ have_m32=Yes if ${CC} -m32 -o arch-minimal arch-minimal.c > /dev/null 2>&1 then printf "Yes.\n" + + printf " Target directory for 32-bit targets... " + + lib32_dir=$(gcc -m32 --print-multiarch) + printf "${lib32_dir}\n" + else printf "No.\n" have_m32=No @@ -181,6 +192,12 @@ have_m64=Yes if ${CC} -m64 -o arch-minimal arch-minimal.c > /dev/null 2>&1 then printf "Yes.\n" + + printf " Target directory for 64-bit targets... " + + lib64_dir=$(gcc -m64 --print-multiarch) + printf "${lib64_dir}\n" + else printf "No.\n" have_m64=No @@ -240,22 +257,45 @@ 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} +LIB32_DIR = lib/${lib32_dir} COMPILER_SUPPORTS_64 = ${have_m64} +LIB64_DIR = lib/${lib64_dir} + +# Version information for glaze library +MAJOR = ${MAJOR} +MINOR = ${MINOR} +RELEASE = ${RELEASE} +VERSION = ${VERSION} + +EOF + +# construct the glaze.pc file +cat > glaze.pc <