Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: configure

Issue 2428004: Overhaul dhcpcd for chrome os use (Closed) Base URL: ssh://git@chromiumos-git//dhcpcd.git
Patch Set: purge hooks from configure to silence complaint Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « common.h ('k') | configure.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Try and be like autotools configure, but without autotools 2 # Try and be like autotools configure, but without autotools
3 3
4 HOOKSET=false
5 ARC4RANDOM= 4 ARC4RANDOM=
6 CLOSEFROM= 5 CLOSEFROM=
7 GETLINE= 6 GETLINE=
8 STRLCPY= 7 STRLCPY=
9 8
10 for x; do 9 for x; do
11 opt=${x%%=*} 10 opt=${x%%=*}
12 var=${x#*=} 11 var=${x#*=}
13 case "$opt" in 12 case "$opt" in
14 --os|OS) OS=$var;; 13 --os|OS) OS=$var;;
15 --with-cc|CC) CC=$var;; 14 --with-cc|CC) CC=$var;;
16 --debug) DEBUG=$var;; 15 --debug) DEBUG=$var;;
17 --disable-debug) DEBUG=no;; 16 --disable-debug) DEBUG=no;;
18 --enable-debug) DEBUG=yes;; 17 --enable-debug) DEBUG=yes;;
19 --fork) FORK=$var;; 18 --fork) FORK=$var;;
20 --disable-fork) FORK=no;; 19 --disable-fork) FORK=no;;
21 --enable-fork) FORK=yes;; 20 --enable-fork) FORK=yes;;
22 --prefix) PREFIX=$var;; 21 --prefix) PREFIX=$var;;
23 --sysconfdir) SYSCONFDIR=$var;; 22 --sysconfdir) SYSCONFDIR=$var;;
24 --bindir|--sbindir) SBINDIR=$var;; 23 --bindir|--sbindir) SBINDIR=$var;;
25 --libexecdir) LIBEXECDIR=$var;; 24 --libexecdir) LIBEXECDIR=$var;;
26 --statedir|--localstatedir) STATEDIR=$var;; 25 --statedir|--localstatedir) STATEDIR=$var;;
27 --dbdir) DBDIR=$var;; 26 --dbdir) DBDIR=$var;;
28 --rundir) RUNDIR=$var;; 27 --rundir) RUNDIR=$var;;
29 --mandir) MANDIR=$var;; 28 --mandir) MANDIR=$var;;
30 --with-ccopts|CFLAGS) CFLAGS=$var;; 29 --with-ccopts|CFLAGS) CFLAGS=$var;;
31 CPPFLAGS) CPPFLAGS=$var;; 30 CPPFLAGS) CPPFLAGS=$var;;
32 --with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;
33 --with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var; HOOKSET=true;;
34 --build) BUILD=$var;; 31 --build) BUILD=$var;;
35 --host) HOST=$var;; 32 --host) HOST=$var;;
36 --target) TARGET=$var;; 33 --target) TARGET=$var;;
37 --libdir) LIBDIR=$var;; 34 --libdir) LIBDIR=$var;;
38 --without-arc4random) ARC4RANDOM=no;; 35 --without-arc4random) ARC4RANDOM=no;;
39 --without-closefrom) CLOSEFROM=no;; 36 --without-closefrom) CLOSEFROM=no;;
40 --without-getline) GETLINE=no;; 37 --without-getline) GETLINE=no;;
41 --without-strlcpy) STRLCPY=no;; 38 --without-strlcpy) STRLCPY=no;;
42 --datadir|--infodir) ;; # ignore autotools 39 --datadir|--infodir) ;; # ignore autotools
43 --help) echo "See the README file for available options"; exit 0;; 40 --help) echo "See the README file for available options"; exit 0;;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 STRLCPY=no 304 STRLCPY=no
308 fi 305 fi
309 echo "$STRLCPY" 306 echo "$STRLCPY"
310 rm -f _strlcpy.c _strlcpy 307 rm -f _strlcpy.c _strlcpy
311 fi 308 fi
312 if [ "$STRLCPY" = no ]; then 309 if [ "$STRLCPY" = no ]; then
313 echo "COMPAT_SRCS+= compat/strlcpy.c" >>$CONFIG_MK 310 echo "COMPAT_SRCS+= compat/strlcpy.c" >>$CONFIG_MK
314 echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H 311 echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H
315 fi 312 fi
316 313
317 HOOKS=
318 if ! $HOOKSET; then
319 printf "Checking for ntpd ... "
320 NTPD=$(_which ntpd)
321 if [ -n "$NTPD" ]; then
322 echo "$NTPD (50-ntp.conf)"
323 HOOKS="$HOOKS${HOOKS:+ }50-ntp.conf"
324 else
325 echo "not found"
326 fi
327
328 printf "Checking for ypind ... "
329 YPBIND=$(_which ypbind)
330 if [ -n "$YPBIND" ]; then
331 if strings "$YPBIND" | grep -q yp.conf; then
332 YPHOOK="50-yp.conf"
333 else
334 YPHOOK="50-ypbind"
335 fi
336 echo "$YPBIND ($YPHOOK)"
337 HOOKS="$HOOKS${HOOKS:+ }$YPHOOK"
338 else
339 echo "not found"
340 fi
341 fi
342
343 cd dhcpcd-hooks
344 for x in $HOOKSCRIPTS; do
345 printf "Finding hook $x ... "
346 for h in [0-9][0-9]"-$x" [0-9][0-9]"-$x.sh" [0-9][0-9]"-$x.conf"; do
347 [ -e "$h" ] && break
348 done
349 if [ ! -e "$h" ]; then
350 echo "no"
351 else
352 echo "$h"
353 case " $HOOKS " in
354 *" $h "*) ;;
355 *) HOOKS="$HOOKS${HOOKS:+ }$h";;
356 esac
357 fi
358 done
359 cd ..
360 echo "HOOKSCRIPTS= $HOOKS" >>$CONFIG_MK
361
362 echo 314 echo
363 echo " SYSCONFDIR = $SYSCONFDIR" 315 echo " SYSCONFDIR = $SYSCONFDIR"
364 echo " SBINDIR = $SBINDIR" 316 echo " SBINDIR = $SBINDIR"
365 echo " LIBDIR = $LIBDIR" 317 echo " LIBDIR = $LIBDIR"
366 echo " LIBEXECDIR = $LIBEXECDIR" 318 echo " LIBEXECDIR = $LIBEXECDIR"
367 echo " DBDIR = $DBDIR" 319 echo " DBDIR = $DBDIR"
368 echo " RUNDIR = $RUNDIR" 320 echo " RUNDIR = $RUNDIR"
369 echo " MANDIR = $MANDIR" 321 echo " MANDIR = $MANDIR"
370 echo " HOOKSCRIPTS = $HOOKS"
371 echo 322 echo
OLDNEW
« no previous file with comments | « common.h ('k') | configure.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698