srilm works on FreeBSD

Zhang Le ejoy at peoplemail.com.cn
Thu Apr 17 06:23:32 PDT 2003


Hi all,
     I just managed to get srilm 1.3.3 work on an FreeBSD.
     I change the following lines in bin/machine-type to detect FreeBSD.

 set MACHINE_TYPE = cygwin
 else if (`uname -s` =~ FreeBSD*) then
+set MACHINE_TYPE = freebsd
 else if (`uname -s` == Darwin) then
 set MACHINE_TYPE = macosx
  
  And add a common/Makefile.machine.freebsd modified from cygwin
  configure file(see attachment).

  "gmake World" now works fine under FreeBSD.

     here is uname -a:
     FreeBSD  4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sat Apr 12 22:18:07
     CST 2003     zl@:/usr/src/sys/compile/MYKERNEL  i386

     I also test it on an FreeBSD 5.0-RELEASE.
--
                                     Sincerely yours,
                                            Zhang Le
-------------- next part --------------
#
#    File:   Makefile.i686
#    Author: The SRI DECIPHER (TM) System
#    Date:   Fri Feb 19 22:45:31 PST 1999
#
#    Description:
#	Machine dependent compilation options and variable definitions
#	for CYGWIN/i686 platform
#
#    Copyright (c) 1999-2002 SRI International.  All Rights Reserved.
#
#    $Header: /home/srilm/devel/common/RCS/Makefile.machine.cygwin,v 1.4 2003/02/27 18:25:11 stolcke Exp $
#

   # Use the GNU C compiler.
   GCC_FLAGS = -Wreturn-type -Wimplicit
   CC = gcc $(GCC_FLAGS)
   CXX = g++ -Wno-deprecated $(GCC_FLAGS) -DINSTANTIATE_TEMPLATES

   # Optional compilation flags.
   OPTIMIZE_FLAGS = -g -O2
   DEBUG_FLAGS = -g -DDEBUG
   PROFILE_FLAGS = -g -pg -O2

   # Optional linking flags.
   EXPORT_LDFLAGS = -s

   # Shared compilation flags.
   CFLAGS = $(ADDITIONAL_CFLAGS) $(INCLUDES)
   CXXFLAGS = $(ADDITIONAL_CXXFLAGS) $(INCLUDES)

   # Shared linking flags.
   LDFLAGS = $(ADDITIONAL_LDFLAGS) -L$(SRILM_LIBDIR)

   # Other useful compilation flags.
   ADDITIONAL_CFLAGS =
   ADDITIONAL_CXXFLAGS =

   # Other useful include directories.
   ADDITIONAL_INCLUDES = 

   # Other useful linking flags.
   ADDITIONAL_LDFLAGS = 

   # Other useful libraries.
   ADDITIONAL_LIBRARIES = -lm 

   # run-time linker path flag
   RLD_FLAG = -R

   # Tcl support (part of cygwin)
   TCL_INCLUDE = -I/usr/local/include/tcl8.3
   TCL_LIBRARY = -L/usr/local/lib -ltcl83

   # No ranlib
   RANLIB = :

   # Generate dependencies from source files.
   GEN_DEP = $(CC) $(CFLAGS) -MM

   GEN_DEP.cc = $(CXX) $(CXXFLAGS) -MM

   # Run lint.
   LINT = lint
   LINT_FLAGS = -DDEBUG $(CFLAGS)

   # Location of gawk binary
   GAWK = /usr/bin/gawk



More information about the SRILM-User mailing list