Bump date stamp to 20130330
[official-gcc.git] / libgupc / configure.tgt
blob1f7ccb07fb90f6d467bec1cdb124195d04246f0a
1 # This is the target specific configuration file.  This is invoked by the
2 # autoconf generated configure script.  Putting it in a separate shell file
3 # lets us skip running autoconf when modifying target specific information.
5 # This file is adapted from the libgomp implementation.
7 # This file switches on the shell variable ${target}, and sets the
8 # following shell variables:
9 #  config_path          An ordered list of directories to search for
10 #                       sources and headers.  This is relative to the
11 #                       config subdirectory of the source tree.
12 #  XCFLAGS              Add extra compile flags to use.
13 #  XLDFLAGS             Add extra link flags to use.
16 # Set defaults
17 config_path="posix default"
19 case "${target}" in
21   *-*-hpux*)
22         case "${target}" in
23           *-*-hpux11*)
24              # HPUX v11.x requires -lrt to resolve sem_init in libgupc.la
25              XLDFLAGS="${XLDFLAGS} -lrt"
26              ;;
27         esac
28         case "${target}" in
29           hppa[12]*-*-hpux*)
30             # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
31             XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
32             ;;
33         esac
34         ;;
36   *-*-mingw32*)
37         config_path="mingw32 ${config_path}"
38         ;;
40   *-*-darwin*)
41         config_path="darwin bsd ${config_path}"
42         ;;
44   mips-sgi-irix6*)
45         # Need to link with -lpthread so libgupc.so is self-contained.
46         XLDFLAGS="${XLDFLAGS} -lpthread"
47         ;;
48   *)
49         ;;
51 esac
53 #  The logic above sets configuration directories that may
54 #  be currently unsupported.  Remove non-existent directories
55 #  from the 'config_path' variable.  It is assumed that higher
56 #  level logic will check for valid libgupc targets.
58 _config_path=
59 for cfg_dir in ${config_path}; do
60   if test -d ${srcdir}/config/$cfg_dir; then
61     _config_path="${_config_path} $cfg_dir"
62   fi
63 done
64 config_path="${_config_path}"
66 upc_crtstuff=yes
67 upc_crtbegin_spec=\
68 "%{static:upc-crtbeginT%O%s; shared|pie:upc-crtbeginS%O%s; :upc-crtbegin%O%s}"
69 upc_crtend_spec=\
70 "%{static:upc-crtendT%O%s; shared|pie:upc-crtendS%O%s; :upc-crtend%O%s}"
71 upc_crtstuff_objs=\
72 "upc-crtbeginT.o upc-crtbeginS.o upc-crtbegin.o upc-crtendT.o upc-crtendS.o upc-crtend.o"
73 upc_crtstuff_mak=
74 for cfg_dir in ${config_path}; do
75   cfg_mak=config/$cfg_dir/upc-crtstuff.mak
76   if test -e ${srcdir}/${cfg_mak}; then
77     upc_crtstuff_mak=${cfg_mak}
78     break
79   fi
80 done
82 # The following empty alternatives are kept as place holders
83 # that will be filled in with target-specific settings as needed.
84 case "${target}" in
85   *-*-darwin*)
86     ;;
87   mips-sgi-irix6*)
88     ;;
89   *)
90     ;;
91 esac
93 # For UPC, always add the math library
94 LIBS="-lm $LIBS"
95 if test "${upc_numa}" = "yes"; then
96   LIBS="-lnuma $LIBS"
98 if test "$upc_runtime_model" = "portals4"; then
99   LIBS="-lpthread $LIBS"
100   if test x"$portals4libs" != "x"; then
101     LIBS="$portals4libs $LIBS"
102   fi
104 if test "x${have_rdynamic}" != "x"; then
105   LIBS="-export-dynamic $LIBS"
107 if test "x${bfdlibs}" != "x"; then
108   LIBS="$bfdlibs $LIBS"
110 if test "${have_bfd}" = "yes"; then
111   LIBS="-lbfd -ldl $LIBS"
113 libgupc_spec="%{!fupc-pthreads*:-lgupc;:-lgupc_pt -lpthread}"
114 if test "$enable_upc_link_script" = yes; then
115   libgupc_spec="-T gupc.ld%s ${libgupc_spec}"
117 # Set up the set of libraries that we need to link against for libgupc.
119 link_upc_spec="${libgupc_spec} $LIBS"