$OpenBSD: patch-m3config_src_OpenBSD,v 1.1.1.1 2001/05/05 22:09:23 espie Exp $ --- m3config/src/OpenBSD.orig Wed May 2 18:03:57 2001 +++ m3config/src/OpenBSD Wed May 2 18:27:29 2001 @@ -0,0 +1,74 @@ +% +% Common code to all OpenBSD configurations +% + + +% Let the user override PREFIX/X11BASE/LOCALBASE + +if not defined("PREFIX") +PREFIX = "/usr/local" +end +if not defined("X11BASE") +X11BASE = "/usr/X11R6" +end +if not defined("LOCALBASE") +LOCALBASE = "/usr/local" +end +if not defined("SL") +SL = "/" +end + +INSTALL_ROOT = PREFIX & SL & "pm3" +X11ROOT = X11BASE & SL & "lib" +OPENGLROOT = X11BASE & SL & "lib" +MOTIFROOT = LOCALBASE & SL & "lib" + +PLATFORM_SUPPORTS_MOTIF = "T" +PLATFORM_SUPPORTS_OPENGL = "T" +INSTALL_IMPLS = "" +SKIP_M3GDB = "T" +SKIP_GNUEMACS = "T" +M3CC_MAKE = ["gmake", "BISON=yacc"] +RANLIB = ["ranlib"] + +BOPT_FLAG = "-O2" +BPIC_FLAG = ["-O2", "-fPIC"] +CC = ["cc","-c"] +GNU_CC = "cc" +LINK = ["cc"] +MAKELIB = [ "ar", "cru" ] +MAKESHLIB = ["cc","-shared", "-fPIC"] +OPT_FLAG = "-O2" +RPATH_FLAG = "-R" +RPATH_prefix = "" +RPATH_LIB_USE_ONLY = "T" + +% OpenBSD/a.out requires a major and minor version number on each shared +% library. Don't try to derive these from the PM3 version number. That +% approach does not work out well in practice. +SHLIB_VERSION = "0.1" +SONAME_OPTION = [] + + +proc m3_make_shared_lib (lib, objects, imported_libs) is + local lib_sox = format ("lib%s.so.%s", lib, SHLIB_VERSION) + local cmd = [MAKESHLIB_CMD, "-o", lib_sox, objects] + + if VERBOSE write(cmd, CR) end + return exec(cmd) +end + +proc m3_note_shlib(lib) is + if Options{"shared_lib"}[0] and PLATFORM_SUPPORTS_SHARED_LIB + local lib_sox = format ("lib%s.so.%s", lib, SHLIB_VERSION) + + if defined ("_all") + install_derived(lib_sox) + install_link(lib_sox, + LIB_TO_PKG_USE & SL & PACKAGE & SL & BUILD_DIR, LIB_INSTALL) + end + deriveds (lib_sox, [""]) + end +end + +setDefault("","")