"Fossies" - the Fresh Open Source Software Archive

Member "xfe-1.43.2/configure.ac" (24 Feb 2019, 7955 Bytes) of package /linux/privat/xfe-1.43.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.43.1_vs_1.43.2.

    1 #
    2 # Script for autoconf 2.69 or later and automake 1.14 or later
    3 #
    4 
    5 # Initialize
    6 AC_INIT([xfe], [1.43.2])
    7 AC_CONFIG_SRCDIR([src/XFileExplorer.cpp])
    8 AM_INIT_AUTOMAKE([subdir-objects -Wall])
    9 AM_CONFIG_HEADER([config.h])
   10 
   11 # Test if compilation variables are already set and if not, reset them
   12 # This mechanism prevents these variables to be changed by the following AC macros
   13 # while still allowing to use user's variables if they are defined
   14 if test "$CXXFLAGS" = ""; then
   15 CXXFLAGS=""
   16 fi
   17 if test "$CFLAGS" = ""; then
   18 CFLAGS=""
   19 fi
   20 
   21 # Minimal LIBS
   22 LIBS="$LIBS -lX11"
   23 
   24 AC_USE_SYSTEM_EXTENSIONS
   25 
   26 # Checks for programs
   27 AC_PROG_CC
   28 AC_PROG_CXX
   29 AC_PROG_INSTALL
   30 AC_PROG_LN_S
   31 AC_PROG_MAKE_SET
   32 PKG_PROG_PKG_CONFIG
   33 
   34 
   35 # Internationalization
   36 IT_PROG_INTLTOOL
   37 GETTEXT_PACKAGE=xfe
   38 AC_SUBST(GETTEXT_PACKAGE)
   39 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The package name, for gettext])
   40 AM_GNU_GETTEXT
   41 
   42 # Checks for header files.
   43 AC_PATH_X
   44 AC_FUNC_ALLOCA
   45 AC_HEADER_DIRENT
   46 AC_HEADER_STDC
   47 AC_HEADER_SYS_WAIT
   48 AC_CHECK_HEADERS([fcntl.h mntent.h stdlib.h string.h sys/ioctl.h sys/statfs.h sys/time.h unistd.h utime.h])
   49 
   50 
   51 # Checks for typedefs, structures, and compiler characteristics.
   52 AC_HEADER_STDBOOL
   53 AC_C_CONST
   54 AC_TYPE_UID_T
   55 AC_C_INLINE
   56 AC_TYPE_MODE_T
   57 AC_TYPE_PID_T
   58 AC_TYPE_SIZE_T
   59 AC_CHECK_MEMBERS([struct stat.st_rdev])
   60 AC_HEADER_TIME
   61 AC_STRUCT_TM
   62 
   63 
   64 # Checks for library functions.
   65 AC_FUNC_CHOWN
   66 AC_FUNC_CLOSEDIR_VOID
   67 AC_FUNC_ERROR_AT_LINE
   68 AC_FUNC_FORK
   69 AC_FUNC_GETGROUPS
   70 AC_FUNC_GETMNTENT
   71 AC_FUNC_LSTAT
   72 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
   73 AC_FUNC_MALLOC
   74 AC_FUNC_MKTIME
   75 AC_FUNC_REALLOC
   76 AC_FUNC_STAT
   77 AC_FUNC_UTIME_NULL
   78 AC_CHECK_FUNCS([endgrent endpwent gethostname getmntent gettimeofday lchown memset mkdir mkfifo putenv rmdir setlocale sqrt strchr strdup strerror strstr strtol strtoul strtoull utime])
   79 
   80 
   81 # Large files support
   82 AC_SYS_LARGEFILE
   83 
   84 
   85 # Check for FOX 1.6
   86 AC_CHECK_LIB(FOX-1.6,fxfindfox,,AC_MSG_ERROR("libFOX-1.6 not found"))
   87 
   88 
   89 # Check for FOX 1.6 header files
   90 AC_HEADER_STDC
   91 AC_LANG_CPLUSPLUS
   92 AC_CHECK_HEADER(fox-1.6/fx.h,,AC_MSG_ERROR("fox-1.6/fx.h not found"))
   93 
   94 
   95 # Check if fox-config exists
   96 AC_CHECK_PROGS(FOX_CONFIG,fox-config-1.6 fox-1.6-config fox-config)
   97 if test no"$FOX_CONFIG" = no ; then
   98 	AC_MSG_ERROR("fox-config not found")               
   99 fi
  100 
  101 
  102 # Include flags for the FOX library
  103 FOXCFLAGS=`$FOX_CONFIG --cflags`
  104 CXXFLAGS="${CXXFLAGS} $FOXCFLAGS"
  105 
  106 
  107 # Check if FOX was compiled with xft support
  108 TEST_XFT=`$FOX_CONFIG --libs | grep Xft`
  109 if test "x$TEST_XFT" != "x" ; then
  110 	
  111 	echo "checking whether FOX was compiled with Xft support... yes"
  112 
  113 	# Check for FreeType2
  114 	PKG_CHECK_MODULES(FREETYPE, freetype2, [
  115 		freetype_cflags="$FREETYPE_CFLAGS"
  116 		freetype_libs="$FREETYPE_LIBS"
  117 		LIBS="$LIBS $freetype_libs"
  118 		CPPFLAGS="$freetype_cflags $CPPFLAGS"
  119 	], AC_MSG_ERROR("freetype not found"))
  120 
  121 	# Check for Xft headers
  122 	xft_config=''
  123 	AC_CHECK_PROGS(xft_config,xft-config,)
  124 	if test -n "$xft_config"; then
  125 	  xft_cflags=`$xft_config --cflags`
  126 	  xft_libs=`$xft_config --libs`
  127 	  LIBS="$LIBS $xft_libs"
  128 	  CPPFLAGS="$xft_cflags $CPPFLAGS"
  129 	  CXXFLAGS="${CXXFLAGS} -DHAVE_XFT_H"
  130 	else
  131 		# On some systems xft-config is deprecated and pkg-config should be used instead
  132 		PKG_CHECK_MODULES(XFT, xft, [
  133 			xft_cflags="$XFT_CFLAGS"
  134 			xft_libs="$XFT_LIBS"
  135 			LIBS="$LIBS $xft_libs"
  136 			CPPFLAGS="$xft_cflags $CPPFLAGS"
  137 			CXXFLAGS="$CXXFLAGS -DHAVE_XFT_H"
  138 		], AC_MSG_ERROR("Xft not found"))
  139 	fi
  140 	AC_CHECK_HEADER(X11/Xft/Xft.h,,AC_MSG_ERROR("Xft.h not found"))
  141 
  142 else
  143 	echo "checking whether FOX was compiled with Xft support... no"
  144 	echo ""
  145 	echo "===================================== Error! ================================================"
  146 	echo "Configure has detected that your FOX library was compiled without Xft support."
  147 	echo "Since Xfe version 1.42, Xft is mandatory and FOX *must* have been compiled with Xft support."
  148 	echo "To enable Xft support in FOX, rebuild the FOX library using the following commands:"
  149 	echo "   ./configure --with-xft"
  150 	echo "   make"
  151 	echo "   sudo make install"
  152 	echo "============================================================================================="
  153 	echo ""
  154 	AC_MSG_ERROR("missing Xft support in FOX")               
  155 fi
  156 
  157 
  158 # Check for Xlib headers
  159 AC_CHECK_HEADER(X11/Xlib.h,,AC_MSG_ERROR("Xlib.h not found"))
  160 
  161 # Check for XRandR support
  162 AC_MSG_CHECKING(for xrandr extension)
  163 AC_ARG_WITH(xrandr,[  --with-xrandr           compile with XRandR support])
  164 AC_MSG_RESULT([$with_xrandr])
  165 if test "x$with_xrandr" != "xno"; then
  166 AC_CHECK_HEADERS(X11/extensions/Xrandr.h,CXXFLAGS="${CXXFLAGS} -DHAVE_XRANDR_H=1"; LIBS="${LIBS} -lXrandr")
  167 fi
  168 
  169 # Check for libPNG
  170 AC_CHECK_LIB(png, png_read_info,,AC_MSG_ERROR("libPNG not found"))
  171 AC_CHECK_HEADER(png.h,,AC_MSG_ERROR("png.h not found"))
  172 
  173 # Check for fontconfig
  174 AC_CHECK_LIB(fontconfig, FcInit,, AC_MSG_ERROR("fontconfig not found"))
  175 AC_CHECK_HEADER(fontconfig/fontconfig.h,,AC_MSG_ERROR("fontconfig.h not found"))
  176 
  177 # Check for startup notification support
  178 AC_MSG_CHECKING(for startup notification)
  179 AC_ARG_ENABLE(sn,[  --disable-sn            compile without startup notification support])
  180 AC_MSG_RESULT([$enable_sn])
  181 AC_SUBST(STARTUPNOTIFY,false)
  182 if test "x$enable_sn" != "xno"; then
  183 	CXXFLAGS="${CXXFLAGS} -DSTARTUP_NOTIFICATION"
  184 	AC_SUBST(STARTUPNOTIFY,true)
  185 	enable_sn=yes
  186 
  187 	# Check for xcb libs
  188 	PKG_CHECK_MODULES([xcb], [xcb >= 1.6],,
  189 		[AC_MSG_ERROR([Cannot find xcb])])
  190 	PKG_CHECK_MODULES([xcb_aux], [xcb-aux],,
  191 		[AC_MSG_ERROR([Cannot find xcb-aux])])
  192 	PKG_CHECK_MODULES([xcb_event], [xcb-event],,
  193 		[AC_MSG_ERROR([Cannot find xcb-event])])
  194 	PKG_CHECK_MODULES([x11_xcb], [x11-xcb],,
  195 		[AC_MSG_ERROR([Cannot find x11-xcb])])
  196 	LIBS="$LIBS $xcb_LIBS $xcb_aux_LIBS $x11_xcb_LIBS"
  197 fi
  198 AM_CONDITIONAL(STARTUPNOTIFY, [test x$enable_sn = xyes])
  199 
  200 
  201 # Building for debugging
  202 AC_MSG_CHECKING(for debugging)
  203 AC_ARG_ENABLE(debug,[  --enable-debug          compile for debugging])
  204 AC_MSG_RESULT([$enable_debug])
  205 
  206 # Add debug symbols
  207 AC_MSG_CHECKING(minimalflags)
  208 AC_ARG_ENABLE(minimalflags,[  --enable-minimalflags   respect system flags as much as possible])
  209 AC_MSG_RESULT([$enable_minimalflags])
  210 
  211 # Building for release
  212 AC_MSG_CHECKING(for release build)
  213 AC_ARG_ENABLE(release,[  --enable-release        compile for release (advanced optimizations)])
  214 AC_MSG_RESULT([$enable_release])
  215 
  216 
  217 if test "x$enable_minimalflags" = "xyes" ; then
  218 	if test "x$enable_debug" = "xyes" ; then
  219 		CPPFLAGS="$CPPFLAGS -DDEBUG"
  220 	else
  221 		CPPFLAGS="$CPPFLAGS -DNDEBUG"
  222 	fi
  223 else
  224 	# Setting CXXFLAGS
  225 	if test "x$enable_debug" = "xyes" ; then
  226 		CXXFLAGS="${CXXFLAGS} -Wall -g -DDEBUG"
  227 	elif test "x$enable_release" = "xyes" ; then
  228 		CXXFLAGS="-DNDEBUG ${CXXFLAGS} "
  229 		if test "${GXX}" = "yes" ; then
  230 			CXXFLAGS="-O3 -Wall -ffast-math -fomit-frame-pointer -fno-strict-aliasing ${CXXFLAGS}"
  231 		fi
  232 	else
  233 		CXXFLAGS="-O2 -Wall ${CXXFLAGS}"
  234 	fi
  235 
  236 
  237 	# Setting CFLAGS
  238 	if test "x$enable_debug" = "xyes" ; then
  239 		CFLAGS="${CFLAGS} -Wall -g -DDEBUG"
  240 	elif test "x$enable_release" = "xyes" ; then
  241 		CFLAGS="-DNDEBUG ${CFLAGS}"
  242 		if test "${GCC}" = "yes" ; then
  243 			CFLAGS="-O3 -Wall -ffast-math -fomit-frame-pointer -fno-strict-aliasing ${CFLAGS}"
  244 		fi
  245 	else
  246 		CFLAGS="-O2 -Wall ${CFLAGS}"
  247 	fi
  248 fi
  249 
  250 
  251 # Output
  252 AC_OUTPUT(Makefile intl/Makefile m4/Makefile po/Makefile.in xfe.spec xferc xfe.desktop.in xfi.desktop.in
  253           xfw.desktop.in xfp.desktop.in src/Makefile
  254           icons/Makefile icons/xfe-theme/Makefile icons/gnome-theme/Makefile
  255           icons/gnomeblue-theme/Makefile icons/windows-theme/Makefile
  256 		  icons/tango-theme/Makefile icons/kde-theme/Makefile)
  257 
  258 
  259 # Display CXXFLAGS, CFLAGS and LIBS
  260 echo ""
  261 echo "======================== Compiler and linker flags ========================"
  262 echo "CXXFLAGS=$CXXFLAGS"
  263 echo "CFLAGS=$CFLAGS"
  264 echo "LIBS=$LIBS"
  265 echo "==========================================================================="
  266 
  267 echo ""
  268 echo "Configure finished!"
  269 echo "              Do:  'make' to compile Xfe."
  270 echo "            Then:  'make install' (as root) to install Xfe."
  271 echo ""
  272 
  273