2 # FreeType 2 configuration file to detect a UNIX host platform.
6 # Copyright 1996-2000, 2002, 2003, 2004, 2006 by
7 # David Turner, Robert Wilhelm, and Werner Lemberg.
9 # This file is part of the FreeType project, and may only be used, modified,
10 # and distributed under the terms of the FreeType project license,
11 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
12 # indicate that you have read the license and understand and accept it
17 ifeq ($(PLATFORM),ansi)
19 # Note: this test is duplicated in "builds/toplevel.mk".
21 is_unix := $(strip $(wildcard /sbin/init) \
22 $(wildcard /usr/sbin/init) \
23 $(wildcard /dev/null) \
24 $(wildcard /hurd/auth))
30 endif # test PLATFORM ansi
32 ifeq ($(PLATFORM),unix)
37 # If `devel' is the requested target, we use a special configuration
38 # file named `unix-dev.mk'. It disables optimization and libtool.
40 ifneq ($(findstring devel,$(MAKECMDGOALS)),)
41 CONFIG_FILE := unix-dev.mk
47 # If `lcc' is the requested target, we use a special configuration
48 # file named `unix-lcc.mk'. It disables libtool for LCC.
50 ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
51 CONFIG_FILE := unix-lcc.mk
57 # If a Unix platform is detected, the configure script is called and
58 # `unix-def.mk' together with `unix-cc.mk' is created.
60 # Arguments to `configure' should be in the CFG variable. Example:
62 # make CFG="--prefix=/usr --disable-static"
64 # If you need to set CFLAGS or LDFLAGS, do it here also.
66 # Feel free to add support for other platform specific compilers in
67 # this directory (e.g. solaris.mk + changes here to detect the
70 CONFIG_FILE := unix.mk
77 have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
81 ifneq ($(have_Makefile),)
82 # we are building FT2 not in the src tree
83 $(TOP_DIR)/builds/unix/configure $(value CFG)
85 cd builds/unix; ./configure $(value CFG)
89 endif # test PLATFORM unix