1 diff --git a/Makefile.config b/Makefile.config
2 index cc4f318..dc2fed5 100644
5 @@ -42,7 +42,7 @@ CWP_FLAGS = $(LARGE_FILE_FLAG) $(ENDIANFLAG) $(XDRFLAG) $(LINEHDRFLAG)
7 #-----------------------------------------------------------------------
13 LN = ln # this needs to be changed to cp for FAT32 filesystems
14 @@ -59,30 +59,14 @@ POSTLFLAGS =
15 # use both X11 path conventions
16 #-----------------------------------------------------------------------
18 -IX11 = /usr/X11/include
20 -IMOTIF = /usr/X11R6/include
21 -LMOTIF = /usr/X11R6/lib
24 +IMOTIF = $(shell sh -c 'motif-config --cflags')
25 +LMOTIF = $(shell sh -c 'motif-config --libs')
27 LD_LIBRARY_PATH += $(CWPROOT)/lib:${LX11}:${LMOTIF}
29 #-----------------------------------------------------------------------
30 -# Sun/Oracle compilers comment out the Gnu compiler section to use
31 -#-----------------------------------------------------------------------
37 -CFLAGS = -I$I $(OPTC) $(CWP_FLAGS) -D_BSD_SOURCE -D_POSIX_SOURCE
43 -C++FLAGS = -I$I $(OPTC) $(CWP_FLAGS)
45 -#-----------------------------------------------------------------------
46 # Gnu compilers by default just because they are the most common
47 #-----------------------------------------------------------------------