]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-compiler.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-compiler.m4
index 7dc7b7052424624ec525df076c86225c6c31001e..f265d2ca005fee8113ec257de79c9b5a3b3e9349 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $"
+dnl "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $"
 dnl
 dnl   Compiler stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -93,6 +93,7 @@ PIEFLAGS=""
 AC_SUBST(PIEFLAGS)
 
 if test -n "$GCC"; then
+       # Add GCC-specific compiler options...
        if test -z "$OPTIM"; then
                if test "x$with_optim" = x; then
                        # Default to optimize-for-size and debug
@@ -273,6 +274,7 @@ if test -n "$GCC"; then
                        ;;
        esac
 else
+       # Add vendor-specific compiler options...
        case $uname in
                AIX*)
                        if test -z "$OPTIM"; then
@@ -358,6 +360,16 @@ else
                                fi
                        fi
                        ;;
+               OSF*)
+                       # Tru64 UNIX aka Digital UNIX aka OSF/1
+                       if test -z "$OPTIM"; then
+                               if test "x$with_optim" = x; then
+                                       OPTIM="-O"
+                               else
+                                       OPTIM="$with_optim"
+                               fi
+                       fi
+                       ;;
                SunOS*)
                        # Solaris
                        if test -z "$OPTIM"; then
@@ -449,16 +461,25 @@ else
        esac
 fi
 
-if test $uname = HP-UX; then
-       # HP-UX 10.20 (at least) needs this definition to get the
-       # h_errno global...
-       OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
-
-       # HP-UX 11.00 (at least) needs this definition to get the
-       # u_short type used by the IP headers...
-       OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
-fi
+# Add general compiler options per platform...
+case $uname in
+       HP-UX*)
+               # HP-UX 10.20 (at least) needs this definition to get the
+               # h_errno global...
+               OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
+
+               # HP-UX 11.00 (at least) needs this definition to get the
+               # u_short type used by the IP headers...
+               OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
+               ;;
+
+       OSF*)
+               # Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
+               # to be POSIX-compliant...
+               OPTIM="$OPTIM -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE"
+               ;;
+esac
 
 dnl
-dnl End of "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $".
+dnl End of "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $".
 dnl